Created
September 16, 2010 11:58
-
-
Save sylr/582311 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
if test -f ~/.evolution/.running; then | |
echo >&2 "evolution is running, close it before running this script" | |
exit 1 | |
fi | |
for file in $(find ~/.evolution/ -type f -name \*.db); | |
do | |
mime=$(file $file | grep -i "SQLite") | |
size=$(du -h $file | sed -e "s#\(.*\)\t.*#\1#") | |
if test -n "$mime"; then | |
echo vacuuming $file "($size)" | |
sqlite3 $file VACUUM; | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment