From b66a5795a4811cda99f7b6476a33573735385363 Mon Sep 17 00:00:00 2001 From: Jordan Atwood Date: Fri, 16 Dec 2022 22:46:42 -0800 Subject: [PATCH] Store list of post-setup scripts in array --- setup.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/setup.sh b/setup.sh index 33dc3bd..398a358 100755 --- a/setup.sh +++ b/setup.sh @@ -12,6 +12,11 @@ fi DIR="$( dirname "$(readlink -f "${BASH_SOURCE[0]}")" )" SRC_DIR="$DIR/src" +POST_SETUP_SCRIPTS=( + vscode.sh # install vscode configs + ssh.sh # set up SSH config and create key if needed + gpg.sh # create GPG key if needed +) # read file basenames to copy_files array copy_files=() @@ -68,11 +73,6 @@ elif [ $remove -eq 0 ]; then done fi -# install vscode configs -source "$DIR"/vscode.sh - -# set up SSH config and create key if needed -source "$DIR"/ssh.sh - -# create GPG key if needed -source "$DIR"/gpg.sh +for script in "${POST_SETUP_SCRIPTS[@]}"; do + source "${DIR}/${script}" +done