Files
q-tools/aerofs/aerofs-clean
2013-11-05 09:43:02 +02:00

24 lines
502 B
Bash
Executable File

#!/bin/bash
MyRoot=$( sqlite3 $HOME/.aerofs/conf "SELECT v FROM c WHERE k = 'root';" )
MyDir=$( dirname "$MyRoot" )
AEROAUX=($MyDir/.aerofs.aux*)
if [ -z "$1" ]
then echo partial/revisions/conflicts: '(-f to delete.)'
du -h -d 1 "$AEROAUX/"
exit 0
fi
while getopts "f" OPTS;
do case ${OPTS} in
f)
find "$AEROAUX/r" -mindepth 1 -depth -exec rm -Rf \{\} \;
find "$AEROAUX/p" -mindepth 1 -depth -exec rm -Rf \{\} \;
du -h -d 1 "$AEROAUX/"
;;
esac
done