improved clean rule, add --clean param

This commit is contained in:
Christopher Roy Bratusek 2013-07-01 21:47:36 +02:00
parent ef5f6f4b73
commit ea03ac4062

View File

@ -1,6 +1,7 @@
#!/bin/bash #!/bin/bash
TMD_OPTS="--ticket-id=K --tmd-id=K" TMD_OPTS="--ticket-id=K --tmd-id=K"
TMP_FILES=(Another Another_Super_Mario_Brothers_Wii_2.0.zip nsmb.d Newer_Super_Mario_Bros._Wii_HS.zip XmasNewer NewerSMBW.zip NewerFiles "Newer Summer Sun" Newer_Summer_Sun.zip ZPW_1.1.ips lozpw110.rar "*[Ll]ink*[Pp]ast*smc")
setup_tools () { setup_tools () {
@ -19,14 +20,13 @@ setup_tools () {
cleanup_prebuild () { cleanup_prebuild () {
rm -rf ${WORKDIR} rm -rf ${WORKDIR}
rm -f ./*.wbfs rm -f *.wbfs
} }
cleanup () { cleanup () {
rm -f *.{iso,wbfs} NewerSMB.zip rm -rf ${TMP_FILES[@]}
rm -rf NewerFiles nsmb.d
} }
@ -216,6 +216,11 @@ while [[ $xcount -lt $pcount ]]; do
GAME=${1/*=} GAME=${1/*=}
;; ;;
--clean )
cleanup
exit $?
;;
"" | --help ) "" | --help )
echo -e "create wbfs images from riivolution patches.\n echo -e "create wbfs images from riivolution patches.\n
***** using this script is only allowed, if you own an original copy of the game. ***** using this script is only allowed, if you own an original copy of the game.