]> git.donarmstrong.com Git - neurodebian.git/blobdiff - tools/nd_compactvdi
initial version for blends-inject
[neurodebian.git] / tools / nd_compactvdi
index 5f2c544f90e29c042e968ad7a64a4b2657d4ee6b..2aac10aa6cb09649c70ad560b725aafd76d8699b 100755 (executable)
@@ -26,6 +26,8 @@ vdfuse -f "$vdifile" vbdev
 mount -o loop vbdev/Partition1 vbmnt
 
 # remove cruft
+#xapian indices
+find vbmnt/var/ -wholename '*xapian*.DB' -delete
 # package cache
 find vbmnt/var/cache/apt/archives/ -name '*.deb' -delete
 rm -f vbmnt/var/cache/apt/*.bin
@@ -38,9 +40,9 @@ find vbmnt/var/log -type f -delete
 # apt lists
 find vbmnt/var/lib/apt -type f -name '*debian*' -o -type f -name '*list*' -delete
 # user data
+# cannot clean all root stuff, because it also contains useful thing (e.g. git setup)
 rm -f vbmnt/root/.*history
-# everything for the default user
-find vbmnt/home/brain -mindepth 1 -delete
+rm -f vbmnt/home/brain/.*history vbmnt/home/brain/nd*
 
 # unmount filesystem
 umount vbmnt