From 029caff796413ce1b59879512069099e6f93f65f Mon Sep 17 00:00:00 2001 From: Christopher Roy Bratusek Date: Tue, 2 Jul 2013 20:49:15 +0200 Subject: [PATCH] shut up an error message, if no custom banner specified --- script.d/common.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/script.d/common.sh b/script.d/common.sh index b67e387..a62ec54 100644 --- a/script.d/common.sh +++ b/script.d/common.sh @@ -2,7 +2,6 @@ TMD_OPTS="--tt-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" Epic_Super_Bowser_World_v1.00 Epic_Super_Bowser_World_v1.00.zip) -DL_BANNER=FALSE setup_tools () { @@ -85,10 +84,12 @@ download_banner () { apply_banner () { - if [[ ${BANNER} && -e ${BANNER} ]]; then - cp "${BANNER}" "${BANNER_LOCATION}" - else - echo "specified banner ${BANNER} does not exist, not modifying" + if [[ ${BANNER} != "" ]]; then + if [[ -e ${BANNER} ]]; then + cp "${BANNER}" "${BANNER_LOCATION}" + else + echo "specified banner ${BANNER} does not exist, not modifying" + fi fi }