blob: c4f0846ac624dbd09cc0875485c2c1a199706c14 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
#!/bin/sh
rm -f build.log
# Remove generated files
rm -f config/binary config/bootstrap config/chroot config/common config/source config/kanotix
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
# handle additional kanotix parameters
while [ "$1" ]
do
case "$1" in
--help)
lh 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
lh clean noauto --all
exit 1
;;
--tmpfs)
if [ -d tmpfs ]; then
[ "$(stat --printf "%d\n" . tmpfs | uniq -u)" ] && umount tmpfs
rmdir tmpfs
fi
;;
*)
lh clean noauto "$1"
;;
esac
shift
done
exit 1
|