hide stderr if cmp is used on file that does not exist
seen on android in termux
This commit is contained in:
parent
fd8094cbbc
commit
142795993a
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue