avoid depending on cmp
If it was not available, the caches would get deleted unncessarily. This should be just as fast as using it.
This commit is contained in:
parent
30677d5858
commit
db7fb5b8cf
1 changed files with 1 additions and 1 deletions
|
@ -145,7 +145,7 @@ if [ -z "${LOCPATH+set}" ] && [ -z "$GIT_ANNEX_PACKAGE_INSTALL" ]; 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 2>&1 ; then
|
||||
if [ ! -d "$cachebase" ] || [ "$(cat "$localecache/buildid" 2>/dev/null || true)" != "$(cat "$cachebase/buildid" 2>/dev/null || true)" ]; then
|
||||
rm -rf "$localecache" >/dev/null 2>&1 || true
|
||||
fi
|
||||
done
|
||||
|
|
Loading…
Reference in a new issue