From 142795993ac240d1c8bfac9674d675afa2a6ef8e Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 10 Oct 2018 15:28:27 -0400 Subject: [PATCH] hide stderr if cmp is used on file that does not exist seen on android in termux --- standalone/linux/skel/runshell | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/standalone/linux/skel/runshell b/standalone/linux/skel/runshell index a684e76c2b..da0cd550ff 100755 --- a/standalone/linux/skel/runshell +++ b/standalone/linux/skel/runshell @@ -133,13 +133,13 @@ if [ -z "${LOCPATH+set}" ]; then # Clean up locale caches when their standalone bundle no longer exists. for localecache in $HOME/.cache/git-annex/locales/*; do cachebase=$(cat "$localecache/base" 2>/dev/null || true) - if [ ! -d "$cachebase" ] || ! cmp "$localecache/buildid" "$cachebase/buildid" >/dev/null ; then + if [ ! -d "$cachebase" ] || ! cmp "$localecache/buildid" "$cachebase/buildid" >/dev/null 2>&1 ; then rm -rf "$localecache" 2>&1 || true fi done # If the locale cache for this bundle is out of date, refresh it. - if [ -e "$LOCPATH/buildid" ] && ! cmp "$LOCPATH/buildid" "$base/buildid" >/dev/null ; then + if [ -e "$LOCPATH/buildid" ] && ! cmp "$LOCPATH/buildid" "$base/buildid" >/dev/null 2>&1 ; then rm -rf "$LOCPATH" fi if ! mkdir -p "$LOCPATH"; then