From ea03ac4062675e7ad167d3fd07af091e7efaba6b Mon Sep 17 00:00:00 2001 From: Christopher Roy Bratusek Date: Mon, 1 Jul 2013 21:47:36 +0200 Subject: [PATCH] improved clean rule, add --clean param --- script.d/common.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/script.d/common.sh b/script.d/common.sh index 20a9f06..f121156 100644 --- a/script.d/common.sh +++ b/script.d/common.sh @@ -1,6 +1,7 @@ #!/bin/bash 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 () { @@ -19,14 +20,13 @@ setup_tools () { cleanup_prebuild () { rm -rf ${WORKDIR} - rm -f ./*.wbfs + rm -f *.wbfs } cleanup () { - rm -f *.{iso,wbfs} NewerSMB.zip - rm -rf NewerFiles nsmb.d + rm -rf ${TMP_FILES[@]} } @@ -216,6 +216,11 @@ while [[ $xcount -lt $pcount ]]; do GAME=${1/*=} ;; + --clean ) + cleanup + exit $? + ;; + "" | --help ) echo -e "create wbfs images from riivolution patches.\n ***** using this script is only allowed, if you own an original copy of the game.