build: fix a warning on non-GNU distributions
Found on FreeBSD where /bin/sh
descends from Almquist shell. It's very fast superset of POSIX (e.g., local
keyword, $'...'
quoting).
[[
is supported by Bash, Zsh, oksh but not by FreeBSD sh, NetBSD sh, dash, mrsh.
dash$ [[ foo = bar ]]
dash: 1: [[: not found
mrsh$ [[ foo = bar ]]
mrsh:0:0: syntax error: keyword is reserved and causes unspecified results: [[
See also https://gitlab.gnome.org/bilelmoussaoui/gtk-rust-template/-/merge_requests/52
Merge request reports
Activity
Unfortunately,
set -o pipefail
is not posix sh and I'm not sure aboutset -e
andset -u
.I don't want to be responsible for running
rm -rf $HOME/$SOME_UNSET_VAR
or similar when the script is changed somehow so I'm staying with bash, which hopefully isn't a problem, let me know otherwise.