Browse Source

replace use of non standard mv -n flag

The -n flag is a non-standard flag and should not be used in scripts.
See https://man.openbsd.org/FreeBSD-11.1/mv#COMPATIBILITY.
ppa-0.6.1
Fabian Raetz 6 years ago
committed by Rusty Russell
parent
commit
700a0d702d
  1. 7
      tools/refresh-submodules.sh

7
tools/refresh-submodules.sh

@ -6,12 +6,11 @@ if [ $# = 0 ]; then
fi
# git submodule can't run in parallel. Really.
echo $$ > .refresh-submodules.$$
if ! mv -n .refresh-submodules.$$ .refresh-submodules; then
rm -f .refresh-submodules.$$
if ! mkdir .refresh-submodules 2>/dev/null ; then
exit 0
fi
trap "rm -f .refresh-submodules" EXIT
trap "rmdir .refresh-submodules" EXIT
# Be a little careful here, since we do rm -rf!
for m in "$@"; do

Loading…
Cancel
Save