change clean options to partial/revision only
This commit is contained in:
@@ -5,25 +5,29 @@ MyRoot=$( sqlite3 $HOME/.aerofs/conf "SELECT v FROM c WHERE k = 'root';" )
|
|||||||
MyDir=$( dirname "$MyRoot" )
|
MyDir=$( dirname "$MyRoot" )
|
||||||
AEROAUX=($MyDir/.aerofs.aux*)
|
AEROAUX=($MyDir/.aerofs.aux*)
|
||||||
|
|
||||||
|
function cacheusage {
|
||||||
|
find "$AEROAUX/" -mindepth 1 -maxdepth 1 -exec du -sh \{\} \;
|
||||||
|
}
|
||||||
|
|
||||||
if [ -z "$1" ]
|
if [ -z "$1" ]
|
||||||
then echo partial/revisions/conflicts: '(-f to delete all. -d to delete +3 days)'
|
then echo partial/revisions/conflicts: '(-f to delete all. -p/-r to delete +3 days)'
|
||||||
du -h -d 1 "$AEROAUX/"
|
cacheusage
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
while getopts "df" OPTS;
|
while getopts "fpr" OPTS;
|
||||||
do case ${OPTS} in
|
do case ${OPTS} in
|
||||||
f)
|
f)
|
||||||
find "$AEROAUX/r" -mindepth 1 -depth -exec rm -Rf \{\} \;
|
find "$AEROAUX/r" -mindepth 1 -depth -exec rm -Rf \{\} \;
|
||||||
find "$AEROAUX/p" -mindepth 1 -depth -exec rm -Rf \{\} \;
|
find "$AEROAUX/p" -mindepth 1 -depth -exec rm -Rf \{\} \;
|
||||||
du -h -d 1 "$AEROAUX/"
|
|
||||||
;;
|
;;
|
||||||
d)
|
r)
|
||||||
find "$AEROAUX/r" -mindepth 1 -type f -mtime +3 -exec rm -Rf \{\} \;
|
find "$AEROAUX/r" -mindepth 1 -type f -mtime +3 -exec rm -Rf \{\} \;
|
||||||
|
;;
|
||||||
|
p)
|
||||||
find "$AEROAUX/p" -mindepth 1 -type f -mtime +3 -exec rm -Rf \{\} \;
|
find "$AEROAUX/p" -mindepth 1 -type f -mtime +3 -exec rm -Rf \{\} \;
|
||||||
du -h -d 1 "$AEROAUX/"
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
done
|
done
|
||||||
|
cacheusage
|
||||||
|
|||||||
Reference in New Issue
Block a user