From 8decee79189da859238c734a0851ad4121aa1abd Mon Sep 17 00:00:00 2001 From: Sam James Date: Thu, 25 Jan 2024 06:38:49 +0000 Subject: rsync-gen.sh: do not use non-portable `which` Use `command -v` instead. We're hoping to remove which from @system. Signed-off-by: Sam James --- rsync-gen.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rsync-gen.sh b/rsync-gen.sh index 1335dab..82e72b9 100755 --- a/rsync-gen.sh +++ b/rsync-gen.sh @@ -60,14 +60,14 @@ RSYNC_GIT_EXCLUDE="--include core/ --include '*.old' --cvs-exclude --exclude=.gi [[ -d ${LOGDIR} ]] || mkdir ${LOGDIR} [[ -d ${BASE}/tmp ]] || mkdir ${BASE}/tmp TIMESLOG="${LOGDIR}/rsync-gen-times.log" -for atomic_rsync in `which atomic-rsync 2>/dev/null` /usr/share/rsync/atomic-rsync MISSING ; do +for atomic_rsync in `command -v atomic-rsync 2>/dev/null` /usr/share/rsync/atomic-rsync MISSING ; do [ -x $atomic_rsync ] && break done if [ "$atomic_rsync" == "MISSING" ]; then echo "$0: Cannot do final atomic rsync into place, atomic-rsync tool is missing" exit 1 fi -for gemato in `which gemato 2>/dev/null` /usr/local/bin/gemato/bin/gemato MISSING ; do +for gemato in `command -v gemato 2>/dev/null` /usr/local/bin/gemato/bin/gemato MISSING ; do [ -x $gemato ] && break done if [ "$gemato " == "MISSING" ]; then -- cgit v1.2.3-65-gdbad