From d694807c1a351bc59ca659a328342400ba1eeec6 Mon Sep 17 00:00:00 2001 From: "Kevin Veen-Birkenbach [aka. Frantz]" Date: Tue, 19 May 2020 18:17:31 +0200 Subject: [PATCH] Optimized template structure --- {templates => configuration/templates/home}/.profile | 0 {templates => configuration/templates/home}/.xbindkeysrc | 0 scripts/base.sh | 6 ++++-- scripts/client/setup.sh | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) rename {templates => configuration/templates/home}/.profile (100%) rename {templates => configuration/templates/home}/.xbindkeysrc (100%) diff --git a/templates/.profile b/configuration/templates/home/.profile similarity index 100% rename from templates/.profile rename to configuration/templates/home/.profile diff --git a/templates/.xbindkeysrc b/configuration/templates/home/.xbindkeysrc similarity index 100% rename from templates/.xbindkeysrc rename to configuration/templates/home/.xbindkeysrc diff --git a/scripts/base.sh b/scripts/base.sh index 5b28e16..51c3cd4 100644 --- a/scripts/base.sh +++ b/scripts/base.sh @@ -5,13 +5,15 @@ # shellcheck disable=SC2034 #Deactivate checking of unused variables REPOSITORY_PATH=$(readlink -f "$(dirname "$(readlink -f "${0}")")/../../") # Propably this can be optimized -PACKAGE_PATH="$REPOSITORY_PATH/configuration/packages/" +CONFIGURATION_PATH="$REPOSITORY_PATH""/configuration/" +PACKAGE_PATH="$CONFIGURATION_PATH""packages/" +TEMPLATE_PATH="$CONFIGURATION_PATH""templates/"; +HOME_TEMPLATE_PATH="$TEMPLATE_PATH""home/"; ENCRYPTED_PATH="$REPOSITORY_PATH/.encrypted"; DECRYPTED_PATH="$REPOSITORY_PATH/decrypted"; SCRIPT_PATH="$REPOSITORY_PATH/scripts/"; DATA_PATH="$DECRYPTED_PATH/data"; BACKUP_PATH="$DECRYPTED_PATH/backup"; -TEMPLATE_PATH="$REPOSITORY_PATH/templates"; COLOR_RED=$(tput setaf 1) COLOR_GREEN=$(tput setaf 2) diff --git a/scripts/client/setup.sh b/scripts/client/setup.sh index 28599ef..6c663e3 100644 --- a/scripts/client/setup.sh +++ b/scripts/client/setup.sh @@ -28,7 +28,7 @@ install_yay_packages_if_needed(){ info "Start setup of customized core software..." info "Copying templates to home folder..." && -cp -rfv "$TEMPLATE_PATH/." "$HOME" || error "Copy templates failed." +cp -rfv "$HOME_TEMPLATE_PATH/." "$HOME" || error "Copy templates failed." info "Update packages..." && sudo pacman -Syyu || error "Package syncronisation failed."