#!/bin/sh rm -f build.log # Remove generated files rm -f config/binary config/bootstrap config/chroot config/common config/source \ config/kanotix config/chroot_local-packageslists/kanotix-flavours.list rm -f config/package-lists/compat.list.chroot if [ -f config/all ]; then sed -i '/^. config\/kanotix/d' config/all [ ! -s config/all ] && rm -f config/all fi # remove kanotix-scripts grep -oe '^[^ #]*' scripts.urls | grep -oe '[^/]*$' | xargs -i rm -f config/chroot_local-includes/usr/local/bin/{} # Remove empty directories in config tree if ls config/*/ > /dev/null 2>&1 then rmdir --ignore-fail-on-non-empty config/*/ fi if [ -d config ] then rmdir --ignore-fail-on-non-empty config fi [ $# -eq 0 ] && lb clean noauto # handle additional kanotix parameters while [ "$1" ] do case "$1" in --help) lb clean noauto --help echo -e "\nAdditional Options for Kanotix:\n\t[--tmpfs]\n" exit 1 ;; --all) if [ -d tmpfs ]; then [ "$(stat --printf "%d\n" . tmpfs | uniq -u)" ] && umount tmpfs rmdir tmpfs fi lb clean noauto --all exit 1 ;; --tmpfs) if [ -d tmpfs ]; then [ "$(stat --printf "%d\n" . tmpfs | uniq -u)" ] && umount tmpfs rmdir tmpfs fi ;; *) lb clean noauto "$1" ;; esac shift done exit 1