aerofs tools

This commit is contained in:
q
2013-11-05 09:43:02 +02:00
parent 3002868165
commit bd811f4022
2 changed files with 188 additions and 0 deletions

23
aerofs/aerofs-clean Executable file
View File

@@ -0,0 +1,23 @@
#!/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