mirror of
https://github.com/kevinveenbirkenbach/linux-image-manager.git
synced 2024-11-22 07:01:03 +01:00
Optimized shellcheck hints
This commit is contained in:
parent
ab176c51b2
commit
7226d6b331
@ -2,6 +2,7 @@
|
|||||||
# @author Kevin Veen-Birkenbach
|
# @author Kevin Veen-Birkenbach
|
||||||
# shellcheck disable=SC2015 # Deactivating bool hint
|
# shellcheck disable=SC2015 # Deactivating bool hint
|
||||||
# shellcheck source=/dev/null # Deactivate SC1090
|
# 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}')"
|
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."
|
info "For performance reasons docker is not enabled. Start docker by executing \"sudo systemctl restart docker\" when you need it."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! "$(pacman -Qi virtualbox)" ] ; then
|
if [ ! "$(pacman -Qi "virtualbox")" ] ; then
|
||||||
info "Setting up virtualbox..." &&
|
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 &&
|
sudo vboxreload &&
|
||||||
pamac build virtualbox-ext-oracle &&
|
pamac build virtualbox-ext-oracle &&
|
||||||
sudo gpasswd -a "$USER" vboxusers || error "Failed."
|
sudo gpasswd -a "$USER" vboxusers || error "Failed."
|
||||||
@ -166,7 +167,7 @@ fi
|
|||||||
|
|
||||||
info "Removing all software from user startup..."
|
info "Removing all software from user startup..."
|
||||||
autostart_folder="$HOME/.config/autostart/"
|
autostart_folder="$HOME/.config/autostart/"
|
||||||
if [ "$(ls -A $autostart_folder)" ]
|
if [ "$(ls -A "$autostart_folder")" ]
|
||||||
then
|
then
|
||||||
(rm "$autostart_folder"* && info "Startups had been removed.") || error "Removing startup software failed."
|
(rm "$autostart_folder"* && info "Startups had been removed.") || error "Removing startup software failed."
|
||||||
else
|
else
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
info "Backupscript for memory devices started"
|
# shellcheck disable=SC2010
|
||||||
|
# shellcheck disable=SC2015 # Deactivating bool hint
|
||||||
|
info "Backupscript for memory devices started..."
|
||||||
echo
|
echo
|
||||||
info "Actual mounted devices:"
|
info "Actual mounted devices:"
|
||||||
echo
|
echo
|
||||||
@ -26,5 +28,9 @@ done
|
|||||||
info "Input file: $ifi"
|
info "Input file: $ifi"
|
||||||
info "Output file: $ofi"
|
info "Output file: $ofi"
|
||||||
question "Please confirm by pushing \"Enter\". To cancel use \"Ctrl + Alt + C\""
|
question "Please confirm by pushing \"Enter\". To cancel use \"Ctrl + Alt + C\""
|
||||||
read -r bestaetigung
|
read -r bestaetigung && echo "$bestaetigung";
|
||||||
dd if="$ifi" of="$ofi" bs=1M status=progress
|
|
||||||
|
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