Optimize installation script
Signed-off-by: Severin Kaderli <severin@kaderli.dev>
This commit is contained in:
parent
049bd01474
commit
aecc51028f
1 changed files with 17 additions and 16 deletions
33
install
33
install
|
@ -25,17 +25,6 @@ HOST="$(hostname)"
|
||||||
|
|
||||||
# Directories which should be created
|
# Directories which should be created
|
||||||
DIRECTORIES=(
|
DIRECTORIES=(
|
||||||
".local/keys"
|
|
||||||
".local/log"
|
|
||||||
".local/share/gnupg/"
|
|
||||||
"build"
|
|
||||||
"documents"
|
|
||||||
"downloads"
|
|
||||||
"projects"
|
|
||||||
"videos"
|
|
||||||
)
|
|
||||||
|
|
||||||
WORK_DIRECTORIES=(
|
|
||||||
".local/keys"
|
".local/keys"
|
||||||
".local/log"
|
".local/log"
|
||||||
".local/share/gnupg/"
|
".local/share/gnupg/"
|
||||||
|
@ -44,6 +33,14 @@ WORK_DIRECTORIES=(
|
||||||
"music"
|
"music"
|
||||||
"pictures"
|
"pictures"
|
||||||
"videos"
|
"videos"
|
||||||
|
)
|
||||||
|
|
||||||
|
PRIVATE_DIRECTORIES=(
|
||||||
|
"build"
|
||||||
|
"projects"
|
||||||
|
)
|
||||||
|
|
||||||
|
WORK_DIRECTORIES=(
|
||||||
"work"
|
"work"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -197,6 +194,11 @@ npm i -g "${NPM_PACKAGES[@]}"
|
||||||
###############################################################################
|
###############################################################################
|
||||||
print_section "Creating directories"
|
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
|
if [ "${IS_WORK}" = "1" ]; then
|
||||||
for dir in "${WORK_DIRECTORIES[@]}"
|
for dir in "${WORK_DIRECTORIES[@]}"
|
||||||
|
@ -205,7 +207,7 @@ if [ "${IS_WORK}" = "1" ]; then
|
||||||
mkdir -p "${HOME}/${dir}"
|
mkdir -p "${HOME}/${dir}"
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
for dir in "${DIRECTORIES[@]}"
|
for dir in "${PRIVATE_DIRECTORIES[@]}"
|
||||||
do
|
do
|
||||||
print_log "Creating directory ${YELLOW}${HOME}/${dir}${RESET}"
|
print_log "Creating directory ${YELLOW}${HOME}/${dir}${RESET}"
|
||||||
mkdir -p "${HOME}/${dir}"
|
mkdir -p "${HOME}/${dir}"
|
||||||
|
@ -358,10 +360,9 @@ print_log "Set default shell to zsh"
|
||||||
###############################################################################
|
###############################################################################
|
||||||
print_section "Post installation information"
|
print_section "Post installation information"
|
||||||
echo "${BOLD}Make sure you do the following after this installation:"
|
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"
|
echo " • Download settings for Visual Studio Code"
|
||||||
|
|
||||||
if [ "${IS_WORK}" = "0" ]; then
|
if [ "${IS_WORK}" = "0" ]; then
|
||||||
echo " • Add taskwarrior keys to ${YELLOW}~/.local/keys/taskwarrior/${RESET}"
|
echo -e " • Add taskwarrior keys to ${YELLOW}~/.local/keys/taskwarrior/${RESET}"
|
||||||
fi
|
fi
|
||||||
echo ""
|
|
Loading…
Add table
Add a link
Reference in a new issue