38 lines
667 B
Bash
38 lines
667 B
Bash
|
#!/bin/bash
|
||
|
source ${WORKDIR}/mklive.conf
|
||
|
source $(dirname $0)/functions.sh
|
||
|
|
||
|
[ -z "$1" ] && err "Nothing to clean"
|
||
|
|
||
|
case "$1" in
|
||
|
bootstrap)
|
||
|
echo "Cleaning bootstrap stage"
|
||
|
rm -r "${WORKDIR}/chroot"
|
||
|
rm ${WORKDIR}/stage/_bootstrap
|
||
|
;;
|
||
|
installer)
|
||
|
echo "cleaning installer stage"
|
||
|
rm -r "${WORKDIR}/INSTALLER"
|
||
|
rm ${WORKDIR}/stage/_installer
|
||
|
;;
|
||
|
pxe)
|
||
|
echo "cleaning pxe stage"
|
||
|
rm -r "${WORKDIR}/PXE"
|
||
|
rm ${WORKDIR}/stage/_pxe
|
||
|
;;
|
||
|
live)
|
||
|
echo "cleaning live stage"
|
||
|
rm -r "${WORKDIR}/LIVE"
|
||
|
rm ${WORKDIR}/stage/_live
|
||
|
;;
|
||
|
iso)
|
||
|
echo "Cleaning iso stage"
|
||
|
rm -r "${WORKDIR}/ISO"
|
||
|
rm ${WORKDIR}/stage/_iso
|
||
|
;;
|
||
|
*)
|
||
|
echo "unkown $1 stage"
|
||
|
;;
|
||
|
esac
|
||
|
|