aboutsummaryrefslogtreecommitdiff
path: root/swob.sh
diff options
context:
space:
mode:
authorLibravatar remph <lhr@disroot.org>2024-10-26 18:02:47 +0100
committerLibravatar remph <lhr@disroot.org>2024-10-26 18:02:47 +0100
commitb07d54a12e7d42228093d0da7365617defd042e6 (patch)
treeb4f9cef115c7eaf8416df94eb681aa851476b471 /swob.sh
parent85ca59aea4669ebb9ca46ff62cf2a4248ec61436 (diff)
Fix on dash; some docs/comments clarifications
Diffstat (limited to 'swob.sh')
-rwxr-xr-xswob.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/swob.sh b/swob.sh
index d0a92b6..bdcdf01 100755
--- a/swob.sh
+++ b/swob.sh
@@ -5,18 +5,18 @@
wobfifo=${XDG_RUNTIME_DIR:-${TMPDIR:-/tmp}}/wob
wobini=
readonly wobfifo
-set -o pipefail -efmu # `set -e' comes after readonly and pipefail, they
- # aren't vital enough to kill the script for
+# `set -e' comes after readonly, which isn't vital enough to kill the script for
+set ${BASH_VERSION:+-o pipefail} -efmu
set_wobini() {
for dir in ${XDG_CONFIG_HOME:+"$XDG_CONFIG_HOME"} ~/.config /etc; do
if test -r "$dir"/swob/wob.ini; then
- wobini="$dir"/swob/wob.ini
+ wobini=$dir/swob/wob.ini
return
fi
done
- # fallthrough to default: temporary wob.ini(5) standin
+ # fine, I will make my own wob.ini(5)
wobini=${XDG_CONFIG_HOME:-~/.config}/swob/wob.ini
echo >&2 "$0: no swob/wob.ini found; writing default to $wobini"
mkdir -p "${wobini%/*}"