summaryrefslogtreecommitdiffstats
path: root/scripts/clean
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/clean')
-rwxr-xr-xscripts/clean22
1 files changed, 22 insertions, 0 deletions
diff --git a/scripts/clean b/scripts/clean
new file mode 100755
index 0000000..78885b6
--- /dev/null
+++ b/scripts/clean
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+for dir in chroot/{dev/pts,proc,sys} ; do
+ if mountpoint -q "$dir" ; then
+ umount "$dir"
+ fi
+done
+
+lh clean noautoconfig ${@}
+
+# rm -f build-*.log
+
+# Remove generated files
+rm -f config/binary config/bootstrap config/chroot config/common config/source
+
+# Remove empty directories in config tree
+if ls config/*/ > /dev/null 2>&1 ; then
+ rmdir --ignore-fail-on-non-empty config/*/
+fi
+
+# Remove unpacked /home/amnesia
+rm -rf config/chroot_local-includes/home/