Avoid deleting cache when killing a long cdg

This commit is contained in:
Thomas Forgione 2018-12-03 09:18:20 +01:00
parent 211ea5f862
commit 0521c68b06
No known key found for this signature in database
GPG Key ID: 203DAEA747F48F41
1 changed files with 3 additions and 1 deletions

View File

@ -102,9 +102,11 @@ if [ -d "$GCLONE_PATH" ]; then
compdef _cdg cdg
_cdg_refresh_cache() {
tmpfile=`mktemp`
find $GCLONE_PATH -maxdepth 3 \
-not -name ".cdgcache" \
-not -name "git" | sort > $GCLONE_PATH/.cdgcache
-not -name "git" | sort > $tmpfile
mv $tmpfile $GCLONE_PATH/.cdgcache
}
_cdg_existing_dirs() {