Browse Source

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
Fraser Tweedale 11 years ago
parent
commit
8925419e90
  1. 7
      test/fast/setup_dir

7
test/fast/setup_dir

@ -5,8 +5,9 @@ @@ -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…
Cancel
Save