Optimize installation script

Signed-off-by: Severin Kaderli <severin@kaderli.dev>
This commit is contained in:
Severin Kaderli 2019-05-29 13:54:37 +02:00
parent 049bd01474
commit aecc51028f
Signed by: severinkaderli
GPG key ID: F419F8835B72F0C4

33
install
View file

@ -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