~oem-solutions-releng/live-build/lb-sg-2.x-add-support-for-xz-and-bzip2-compression

« back to all changes in this revision

Viewing changes to helpers/lh_clean

  • Committer: Daniel Baumann
  • Date: 2011-03-09 17:19:41 UTC
  • Revision ID: daniel@debian.org-20110309171941-vyn0zxupujidmbu9
Adding live-helper 1.0~a15-1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
# Setting static variables
21
21
DESCRIPTION="clean up system build directories"
22
22
HELP=""
23
 
USAGE="${PROGRAM} [all|cache|chroot|binary|lock|purge|stage|source]"
 
23
USAGE="${PROGRAM} [all|cache|chroot|binary|purge|stage|source]"
24
24
 
25
25
Arguments "${@}"
26
26
 
32
32
Read_conffile config/source
33
33
Set_defaults
34
34
 
 
35
rm -f .lock
 
36
 
35
37
case "${1}" in
36
38
        all)
37
39
                "${0}" chroot
38
40
                "${0}" binary
39
 
                "${0}" lock
40
41
                "${0}" stage
41
42
                "${0}" source
42
43
 
53
54
 
54
55
        chroot)
55
56
                ${LH_ROOT_COMMAND} umount -f chroot/sys > /dev/null 2>&1 || true
 
57
                ${LH_ROOT_COMMAND} umount -f chroot/proc/sys/fs/binfmt_misc > /dev/null 2>&1 || true
56
58
                ${LH_ROOT_COMMAND} umount -f chroot/proc > /dev/null 2>&1 || true
57
59
                ${LH_ROOT_COMMAND} umount -f chroot/lib/init/rw > /dev/null 2>&1 || true
58
60
                ${LH_ROOT_COMMAND} umount -f chroot/dev/shm > /dev/null 2>&1 || true
72
74
                ;;
73
75
 
74
76
        binary)
 
77
                ${LH_ROOT_COMMAND} umount -f binary.tmp > /dev/null 2>&1 || true
 
78
                rm -rf binary.tmp binary.deb binary.udeb
75
79
                rm -f binary.iso
76
80
                rm -f binary.img
77
81
                rm -f binary*.tar.gz
78
 
                rm -f packages.txt
79
82
 
80
83
                rm -rf binary
81
84
                rm -rf tftpboot
83
86
                rm -f .stage/binary*
84
87
                ;;
85
88
 
86
 
        lock)
87
 
                rm -f .lock
88
 
                ;;
89
 
 
90
89
        purge)
91
90
                PURGE="true" "${0}" all
92
91
                "${0}" cache