Bash error handling

This commit is contained in:
RealStickman 2020-10-12 07:15:20 +02:00
parent c645e81256
commit 80e04e0b70
9 changed files with 21 additions and 2 deletions

View File

@ -1,5 +1,7 @@
#!/bin/bash #!/bin/bash
set -euo pipefail
#DO NOT MAKE CHANGES TO THE INSTALL SCRIPT HERE. USE arcolinux-config.sh IN ~/scripts FOR THAT #DO NOT MAKE CHANGES TO THE INSTALL SCRIPT HERE. USE arcolinux-config.sh IN ~/scripts FOR THAT
#change to home (does not show in terminal) #change to home (does not show in terminal)

View File

@ -1,5 +1,7 @@
#!/bin/bash #!/bin/bash
set -euo pipefail
#ANY CHANGES TO THE INSTALLATION PROCEDURE SHOULD BE MADE HERE #ANY CHANGES TO THE INSTALLATION PROCEDURE SHOULD BE MADE HERE
#change to home (does not show in terminal) #change to home (does not show in terminal)

View File

@ -1,4 +1,6 @@
#!/bin/bash #!/bin/bash
set -euo pipefail
rm -rvf $HOME/.local/share/Trash rm -rvf $HOME/.local/share/Trash
rm -rvf /mnt/1d90c4d5-21d2-4455-bb4a-814de8496744/.Trash-1000/ rm -rvf /mnt/1d90c4d5-21d2-4455-bb4a-814de8496744/.Trash-1000/

View File

@ -1,5 +1,7 @@
#!/bin/bash #!/bin/bash
set -euo pipefail
# You can call this script like this: # You can call this script like this:
# $./dunst-backlight.sh up # $./dunst-backlight.sh up
# $./dunst-backlight.sh down # $./dunst-backlight.sh down

View File

@ -1,5 +1,7 @@
#!/bin/bash #!/bin/bash
set -euo pipefail
# You can call this script like this: # You can call this script like this:
# $./dunst-volume.sh up # $./dunst-volume.sh up
# $./dunst-volume.sh down # $./dunst-volume.sh down

View File

@ -1,5 +1,7 @@
#!/bin/bash #!/bin/bash
set -euo pipefail
cd "$HOME/GitProjects/config" || exit cd "$HOME/GitProjects/config" || exit
git pull git pull

View File

@ -1,4 +1,7 @@
#!/bin/bash #!/bin/bash
set -euo pipefail
shopt -s nullglob shopt -s nullglob
for g in /sys/kernel/iommu_groups/*; do for g in /sys/kernel/iommu_groups/*; do
echo "IOMMU Group ${g##*/}:" echo "IOMMU Group ${g##*/}:"

View File

@ -1,4 +1,6 @@
#!/bin/bash #!/bin/bash
set -euo pipefail
# redetects PulseAudio outputs # redetects PulseAudio outputs
pacmd unload-module module-udev-detect && pacmd load-module module-udev-detect pacmd unload-module module-udev-detect && pacmd load-module module-udev-detect

View File

@ -1,5 +1,7 @@
#!/bin/bash #!/bin/bash
set -euo pipefail
# redetects PulseAudio outputs # redetects PulseAudio outputs
pacmd unload-module module-udev-detect && pacmd load-module module-udev-detect pacmd unload-module module-udev-detect && pacmd load-module module-udev-detect