tests: avoid reliance on nullglob
Some shells do not have a nullglob feature, including dash (default /bin/sh on Ubuntu) and the Almquist shell (default /bin/sh on FreeBSD). An mv(1) command in setup_dir is failing due to a glob not matching anything, so use a more widely supported construction.master
parent
0f709eafa0
commit
8925419e90
|
@ -5,8 +5,9 @@
|
|||
|
||||
# Back up
|
||||
|
||||
type setopt >/dev/null 2>&1 && setopt NULL_GLOB
|
||||
type shopt >/dev/null 2>&1 && shopt -s nullglob
|
||||
mkdir -p bak
|
||||
mv v* src alias bak || sleep 0s
|
||||
for SRC in v* src alias; do
|
||||
[ -e "$SRC" ] && mv "$SRC" bak
|
||||
done
|
||||
true
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue