mirror of
https://github.com/kevinveenbirkenbach/linux-image-manager.git
synced 2024-11-25 16:31:03 +01:00
Optimized shellcheck hints
This commit is contained in:
parent
ab176c51b2
commit
7226d6b331
@ -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
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user