From 311d768262d45f25835da26d7b7516b940b50024 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Valor=20Mart=C3=ADnez?= Date: Thu, 14 Jan 2021 20:24:58 +0100 Subject: [PATCH] bugfixes --- skyscraper.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/skyscraper.sh b/skyscraper.sh index 6eae88b..b176cdf 100755 --- a/skyscraper.sh +++ b/skyscraper.sh @@ -4,7 +4,7 @@ readonly USAGE=" USAGE: -$(basename "$0") [BUILD or SCRAPe] [PATH] [SYSTEM]" +$(basename "$0") [BUILD or SCRAP] [PATH] [SYSTEM]" function help_message() { echo "$USAGE" @@ -17,14 +17,14 @@ function help_message() { SYSTEMS="apple2 arcade atari2600 atari7800 atarilynx coleco gamegear gb gba gbc mastersystem megadrive msx n64 nes ngpc pcengine sega32x sg1000 snes vectrex virtualboy wonderswan wonderswancolor" -# check if there is any parameter +# check if there are all the parameters if [ "$#" -ne 3 ]; then help_message exit 0 fi -# check if the parameter is valid -if ! echo "$SYSTEMS" | grep -w "$1" >/dev/null; then +# check if the systems parameter is valid +if ! echo "$SYSTEMS" | grep -w "$3" >/dev/null; then printf "%s\n" "You must enter a valid SYSTEM name." help_message exit 0