skyscraper_system
This commit is contained in:
+19
-30
@@ -1,10 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
#!/bin/bash
|
||||
|
||||
readonly USAGE="
|
||||
USAGE:
|
||||
$(basename "$0") [BUILD or SCRAP] [PATH] [SYSTEM]"
|
||||
$(basename "$0") [BUILD or SCRAP] [PATH]"
|
||||
|
||||
function help_message() {
|
||||
echo "$USAGE"
|
||||
@@ -18,40 +15,32 @@ 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 are all the parameters
|
||||
if [ "$#" -ne 3 ]; then
|
||||
help_message
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# 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."
|
||||
if [ "$#" -ne 2 ]; then
|
||||
help_message
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# variables
|
||||
readonly COLOR_BLACK=$(tput setaf 0)
|
||||
readonly COLOR_RED=$(tput setaf 1)
|
||||
readonly COLOR_GREEN=$(tput setaf 2)
|
||||
readonly COLOR_YELLOW=$(tput setaf 3)
|
||||
readonly COLOR_BLUE=$(tput setaf 4)
|
||||
readonly COLOR_MAGENTA=$(tput setaf 5)
|
||||
readonly COLOR_CYAN=$(tput setaf 6)
|
||||
#readonly COLOR_BLACK=$(tput setaf 0)
|
||||
#readonly COLOR_RED=$(tput setaf 1)
|
||||
#readonly COLOR_GREEN=$(tput setaf 2)
|
||||
#readonly COLOR_YELLOW=$(tput setaf 3)
|
||||
#readonly COLOR_BLUE=$(tput setaf 4)
|
||||
#readonly COLOR_MAGENTA=$(tput setaf 5)
|
||||
#readonly COLOR_CYAN=$(tput setaf 6)
|
||||
readonly COLOR_WHITE=$(tput setaf 7)
|
||||
readonly COLOR_BACKGROUND_BLACK=$(tput setab 0)
|
||||
#readonly COLOR_BACKGROUND_BLACK=$(tput setab 0)
|
||||
readonly COLOR_BACKGROUND_RED=$(tput setab 1)
|
||||
readonly COLOR_BACKGROUND_GREEN=$(tput setab 2)
|
||||
readonly COLOR_BACKGROUND_YELLOW=$(tput setab 3)
|
||||
readonly COLOR_BACKGROUND_BLUE=$(tput setab 4)
|
||||
readonly COLOR_BACKGROUND_MAGENTA=$(tput setab 5)
|
||||
readonly COLOR_BACKGROUND_CYAN=$(tput setab 6)
|
||||
readonly COLOR_BACKGROUND_WHITE=$(tput setab 7)
|
||||
#readonly COLOR_BACKGROUND_GREEN=$(tput setab 2)
|
||||
#readonly COLOR_BACKGROUND_YELLOW=$(tput setab 3)
|
||||
#readonly COLOR_BACKGROUND_BLUE=$(tput setab 4)
|
||||
#readonly COLOR_BACKGROUND_MAGENTA=$(tput setab 5)
|
||||
#readonly COLOR_BACKGROUND_CYAN=$(tput setab 6)
|
||||
#readonly COLOR_BACKGROUND_WHITE=$(tput setab 7)
|
||||
readonly RESET_COLOR=$(tput sgr0)
|
||||
|
||||
readonly SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
#readonly SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
readonly ROM_DIR="$2"
|
||||
readonly SYSTEM="$3"
|
||||
readonly CONSOLE_ART=artwork.xml.screenshot
|
||||
readonly CONSOLECD_ART=artwork.xml.cover
|
||||
readonly ARCADE_ART=artwork.xml.wheel
|
||||
@@ -62,13 +51,13 @@ readonly BUILD=true
|
||||
|
||||
if [ "$1" = SCRAP ]; then
|
||||
BUILD=false
|
||||
printf "%s\n" "${WHITE_COLOR}${RED_BACKGROUND_COLOR}## SCRAP ONLY ${RESET_COLOR}"
|
||||
printf "%s\n" "${COLOR_WHITE}${COLOR_BACKGROUND_RED}## SCRAP ONLY ${RESET_COLOR}"
|
||||
sleep 1
|
||||
fi
|
||||
|
||||
if [ "$1" = BUILD ]; then
|
||||
SCRAP=false
|
||||
printf "%s\n" "${WHITE_COLOR}${RED_BACKGROUND_COLOR}## BUILD ONLY ${RESET_COLOR}"
|
||||
printf "%s\n" "${COLOR_WHITE}${COLOR_BACKGROUND_RED}## BUILD ONLY ${RESET_COLOR}"
|
||||
sleep 1
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user