mirror of
https://github.com/kevinveenbirkenbach/linux-image-manager.git
synced 2024-11-25 16:31:03 +01:00
Optimized base.sh
This commit is contained in:
parent
f385bc3d98
commit
c7a804f3f1
@ -4,6 +4,7 @@
|
||||
# @author Kevin Veen-Birkenbach [aka. Frantz]
|
||||
#
|
||||
# shellcheck disable=SC2034 #Deactivate checking of unused variables
|
||||
|
||||
REPOSITORY_PATH=$(readlink -f "$(dirname "$(readlink -f "${0}")")/../")
|
||||
ENCRYPTED_PATH="$REPOSITORY_PATH/.encrypted";
|
||||
DECRYPTED_PATH="$REPOSITORY_PATH/decrypted";
|
||||
@ -33,6 +34,28 @@ declare -a BACKUP_LIST=("$HOME/.ssh/" \
|
||||
COLOR_WHITE=$(tput setaf 7)
|
||||
COLOR_RESET=$(tput sgr0)
|
||||
|
||||
# FUNCTIONS
|
||||
|
||||
message(){
|
||||
echo "$1[$2]:${COLOR_RESET} $3 ";
|
||||
}
|
||||
|
||||
question(){
|
||||
message "${COLOR_MAGENTA}" "QUESTION" "$1";
|
||||
}
|
||||
|
||||
info(){
|
||||
message "${COLOR_BLUE}" "INFO" "$1";
|
||||
}
|
||||
|
||||
warning(){
|
||||
message "${COLOR_YELLOW}" "WARNING" "$1";
|
||||
}
|
||||
|
||||
success(){
|
||||
message "${COLOR_GREEN}" "SUCCESS" "$1";
|
||||
}
|
||||
|
||||
HEADER(){
|
||||
echo
|
||||
echo "${COLOR_YELLOW}The"
|
||||
|
@ -4,10 +4,11 @@
|
||||
# @author Kevin Veen-Birkenbach [aka. Frantz]
|
||||
#
|
||||
# shellcheck source=/dev/null # Deactivate SC1090
|
||||
source "$(dirname "$(readlink -f "${0}")")/base.sh" || echo "Loading base.sh failed." && exit 1
|
||||
source "$(dirname "$(readlink -f "${0}")")/../base.sh" || (echo "Loading base.sh failed." && exit 1)
|
||||
SYSTEM_MEMORY_KB="$(grep MemTotal /proc/meminfo | awk '{print $2}')"
|
||||
echo "Start setup of customized core software..."
|
||||
echo "Copying templates to home folder..."
|
||||
info "Start setup of customized core software..."
|
||||
info "Copying templates to home folder..."
|
||||
exit
|
||||
cp -rfv "$TEMPLATE_PATH/." "$HOME"
|
||||
echo "Synchronising packages..."
|
||||
sudo pacman -Syyu
|
||||
|
Loading…
Reference in New Issue
Block a user