From aecc51028f0540586dd4f8e73d2d68ebe7edad54 Mon Sep 17 00:00:00 2001 From: Severin Kaderli Date: Wed, 29 May 2019 13:54:37 +0200 Subject: [PATCH] Optimize installation script Signed-off-by: Severin Kaderli --- install | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/install b/install index eb2c246..3b1a74f 100755 --- a/install +++ b/install @@ -25,17 +25,6 @@ HOST="$(hostname)" # Directories which should be created DIRECTORIES=( - ".local/keys" - ".local/log" - ".local/share/gnupg/" - "build" - "documents" - "downloads" - "projects" - "videos" -) - -WORK_DIRECTORIES=( ".local/keys" ".local/log" ".local/share/gnupg/" @@ -44,6 +33,14 @@ WORK_DIRECTORIES=( "music" "pictures" "videos" +) + +PRIVATE_DIRECTORIES=( + "build" + "projects" +) + +WORK_DIRECTORIES=( "work" ) @@ -197,6 +194,11 @@ npm i -g "${NPM_PACKAGES[@]}" ############################################################################### print_section "Creating directories" +for dir in "${DIRECTORIES[@]}" + do + print_log "Creating directory ${YELLOW}${HOME}/${dir}${RESET}" + mkdir -p "${HOME}/${dir}" + done if [ "${IS_WORK}" = "1" ]; then for dir in "${WORK_DIRECTORIES[@]}" @@ -205,7 +207,7 @@ if [ "${IS_WORK}" = "1" ]; then mkdir -p "${HOME}/${dir}" done else - for dir in "${DIRECTORIES[@]}" + for dir in "${PRIVATE_DIRECTORIES[@]}" do print_log "Creating directory ${YELLOW}${HOME}/${dir}${RESET}" mkdir -p "${HOME}/${dir}" @@ -358,10 +360,9 @@ print_log "Set default shell to zsh" ############################################################################### print_section "Post installation information" echo "${BOLD}Make sure you do the following after this installation:" -echo " • Run ${YELLOW}~/.config/polybar/scripts/gmail/auth.py${RESET}" +echo -e " • Run ${YELLOW}~/.config/polybar/scripts/gmail/auth.py${RESET}" echo " • Download settings for Visual Studio Code" if [ "${IS_WORK}" = "0" ]; then - echo " • Add taskwarrior keys to ${YELLOW}~/.local/keys/taskwarrior/${RESET}" -fi -echo "" + echo -e " • Add taskwarrior keys to ${YELLOW}~/.local/keys/taskwarrior/${RESET}" +fi \ No newline at end of file