diff --git a/backup b/backup index b9d3013..975001b 100755 --- a/backup +++ b/backup @@ -1,2 +1,5 @@ #!/bin/bash + +set -euo pipefail + rsync -aAXv --delete "$1" --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found","/media/music/*"} "$2" diff --git a/clearmem b/clearmem index 6fe4cca..3845b93 100755 --- a/clearmem +++ b/clearmem @@ -1,2 +1,5 @@ #!/bin/bash + +set -euo pipefail + sync && echo 1 > /proc/sys/vm/drop_caches diff --git a/install-script b/install-script index 0d50a7b..88a8b93 100755 --- a/install-script +++ b/install-script @@ -1,2 +1,5 @@ -#!/bin/sh +#!/bin/bash + +set -euo pipefail + install -m 755 $1 $HOME/.local/bin diff --git a/iplocate b/iplocate index 18778aa..2f13d8c 100755 --- a/iplocate +++ b/iplocate @@ -1,2 +1,5 @@ #!/bin/bash + +set -euo pipefail + curl ipinfo.io/$1 diff --git a/monero-client b/monero-client index c26c036..a2e23ba 100755 --- a/monero-client +++ b/monero-client @@ -1,4 +1,7 @@ -#!/bin/sh +#!/bin/bash + +set -euo pipefail + [ "$#" -eq 0 ] && echo "Requires a command. Run with 'help' for a list of commands." && exit 1 diff --git a/setbg b/setbg index fcc4bc6..f8c677d 100755 --- a/setbg +++ b/setbg @@ -1,5 +1,7 @@ #!/bin/bash +set -euo pipefail + if [ $# -gt 1 ] then echo "Too many arguments" diff --git a/ssh-tunnel b/ssh-tunnel index c540da0..8877c2a 100755 --- a/ssh-tunnel +++ b/ssh-tunnel @@ -1,4 +1,6 @@ -#!/bin/sh +#!/bin/bash + +set -euo pipefail # TODO: # - Add options for port diff --git a/sync-camera b/sync-camera index 90eecb1..8f51fed 100755 --- a/sync-camera +++ b/sync-camera @@ -1,6 +1,6 @@ #!/bin/bash -set -eu +set -euo pipefail CAMERA_DEVICE="" MOUNT_DIR="/tmp/camera-mount" diff --git a/weather b/weather index dfd9b2f..a8963e1 100755 --- a/weather +++ b/weather @@ -1,2 +1,5 @@ -#!/bin/sh +#!/bin/bash + +set -euo pipefail + curl "http://wttr.in/$1?m"