diff --git a/scripts/client/setup.sh b/scripts/client/setup.sh index 75fcf7d..9d87793 100644 --- a/scripts/client/setup.sh +++ b/scripts/client/setup.sh @@ -2,6 +2,7 @@ # @author Kevin Veen-Birkenbach # shellcheck disable=SC2015 # Deactivating bool hint # shellcheck source=/dev/null # Deactivate SC1090 + source "$(dirname "$(readlink -f "${0}")")/../base.sh" || (echo "Loading base.sh failed." && exit 1) SYSTEM_MEMORY_KB="$(grep MemTotal /proc/meminfo | awk '{print $2}')" @@ -86,9 +87,9 @@ if pacman -Qi "docker" > /dev/null ; then info "For performance reasons docker is not enabled. Start docker by executing \"sudo systemctl restart docker\" when you need it." fi -if [ ! "$(pacman -Qi virtualbox)" ] ; then +if [ ! "$(pacman -Qi "virtualbox")" ] ; then info "Setting up virtualbox..." && - pamac install virtualbox $(pacman -Qsq "^linux" | grep "^linux[0-9]*[-rt]*$" | awk '{print $1"-virtualbox-host-modules"}' ORS=' ') && + pamac install virtualbox "$(pacman -Qsq "^linux" | grep "^linux[0-9]*[-rt]*$" | awk '{print $1"-virtualbox-host-modules"}' ORS=' ')" && sudo vboxreload && pamac build virtualbox-ext-oracle && sudo gpasswd -a "$USER" vboxusers || error "Failed." @@ -166,7 +167,7 @@ fi info "Removing all software from user startup..." autostart_folder="$HOME/.config/autostart/" -if [ "$(ls -A $autostart_folder)" ] +if [ "$(ls -A "$autostart_folder")" ] then (rm "$autostart_folder"* && info "Startups had been removed.") || error "Removing startup software failed." else diff --git a/scripts/image/backup.sh b/scripts/image/backup.sh index 72b1b9e..3a5c4fb 100644 --- a/scripts/image/backup.sh +++ b/scripts/image/backup.sh @@ -1,5 +1,7 @@ #!/bin/bash -info "Backupscript for memory devices started" +# shellcheck disable=SC2010 +# shellcheck disable=SC2015 # Deactivating bool hint +info "Backupscript for memory devices started..." echo info "Actual mounted devices:" echo @@ -26,5 +28,9 @@ done info "Input file: $ifi" info "Output file: $ofi" question "Please confirm by pushing \"Enter\". To cancel use \"Ctrl + Alt + C\"" -read -r bestaetigung -dd if="$ifi" of="$ofi" bs=1M status=progress +read -r bestaetigung && echo "$bestaetigung"; + +info "Imagetransfer starts. This can take a while..." && +dd if="$ifi" of="$ofi" bs=1M status=progress || error "\"dd\" failed."; + +success "Imagetransfer successfull." && exit 0;