This commit is contained in:
2022-03-25 10:21:32 +01:00
parent 56b1feaeb1
commit 0142b29f9a
8 changed files with 153 additions and 940 deletions
+18 -12
View File
@@ -1,5 +1,5 @@
#!/bin/bash
readonly USAGE="
USAGE="
USAGE:
$(basename "$0") [BUILD or SCRAP] [PATH] [SYSTEM]"
@@ -11,6 +11,7 @@ function help_message() {
done
printf "\n"
}
readonly USAGE
readonly SYSTEMS="3do 3ds amiga amstradcpc apple2 arcade arcadia astrocde atari800 atari2600 atari5200 atari7800 atarijaguar atarilynx atarist c16 c64 c128 coco coleco daphne dragon32 dreamcast fba fds gameandwatch gamegear gb gba gbc gc genesis intellivision mame-advmame mame-libretro mame-mame4all mastersystem megacd megadrive msx n64 nds neogeo nes ngp ngpc oric pc pc88 pc98 pcfx pcengine pokemini ports ps2 psp psx saturn scummvm sega32x segacd sg-1000 snes steam ti99 trs-80 vectrex vic20 videopac virtualboy wii wonderswan wonderswancolor x68000 x1 zmachine zx81 zxspectrum"
readonly APP=/usr/local/bin/Skyscraper
@@ -29,9 +30,12 @@ if ! echo "$SYSTEMS" | grep -w "$3" >/dev/null; then
fi
## colors
readonly COLOR_WHITE=$(tput setaf 7)
readonly COLOR_BACKGROUND_RED=$(tput setab 1)
readonly RESET_COLOR=$(tput sgr0)
COLOR_WHITE=$(tput setaf 7)
COLOR_BACKGROUND_RED=$(tput setab 1)
RESET_COLOR=$(tput sgr0)
readonly COLOR_WHITE
readonly COLOR_BACKGROUND_RED
readonly RESET_COLOR
## variables
#readonly SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
@@ -40,16 +44,18 @@ readonly SYSTEM_NAME="$3"
readonly FRONTEND="emulationstation"
## artwork
readonly CONSOLE_ART=artwork.xml.cover
readonly ARCADE_ART=artwork.xml.cover
readonly CONSOLE_ART=artwork.xml
readonly ARCADE_ART=artwork.xml
## scrapers
readonly CONSOLE_SCRAPERS="screenscraper mobygames thegamesdb"
readonly ARCADE_SCRAPERS="screenacraper arcadedb"
## flags
readonly BUILD_FLAGS_CONSOLE="videos,unattend,forcefilename,relative"
readonly BUILD_FLAGS_ARCADE="videos,unattend,relative"
readonly BUILD_FLAGS_CONSOLE="videos,unattend,forcefilename,relative,symlink"
readonly BUILD_FLAGS_ARCADE="videos,unattend,relative,symlink"
readonly SCRAP_FLAGS_CONSOLE="videos,unattend,noresize,unpack"
readonly SCRAP_FLAGS_ARCADE="videos,unattend,noresize"
## systems
readonly CONSOLE="3do 3ds amiga amstradcpc apple2 arcadia astrocde atari800 atari2600 atari5200 atari7800 atarijaguar atarilynx atarist c16 c64 c128 coco coleco daphne dragon32 dreamcast fds gameandwatch gamegear gb gba gbc gc genesis intellivision mastersystem megacd megadrive msx n64 nds nes ngp ngpc oric pc pc88 pc98 pcfx pcengine pokemini ports ps2 psp psx saturn scummvm sega32x segacd sg-1000 snes ti99 trs-80 vectrex vic20 videopac virtualboy wii wonderswan wonderswancolor x68000 x1 zmachine zx81 zxspectrum"
@@ -73,7 +79,7 @@ fi
if echo "${CONSOLE}" | grep -w "${SYSTEM_NAME}" >/dev/null; then
if [ "${SCRAP}" = true ]; then
for SCRAPER in ${CONSOLE_SCRAPERS}; do
$APP --flags videos,unattend,noresize,unpack -p "${SYSTEM_NAME}" -s "${SCRAPER}" -i "${ROM_DIR}"/"${SYSTEM_NAME}"
$APP --flags "${SCRAP_FLAGS_CONSOLE}" -p "${SYSTEM_NAME}" -s "${SCRAPER}" -i "${ROM_DIR}"/"${SYSTEM_NAME}"
done
fi
if [ "${BUILD}" = true ]; then
@@ -86,7 +92,7 @@ fi
if echo "${ARCADE}" | grep -w "${SYSTEM_NAME}" >/dev/null; then
if [ "${SCRAP}" = true ]; then
for SCRAPER in ${ARCADE_SCRAPERS}; do
Skyscraper --flags videos,unattend,noresize -p "${SYSTEM_NAME}" -s "${SCRAPER}" -i "${ROM_DIR}"/"${SYSTEM_NAME}"
Skyscraper --flags "${SCRAP_FLAGS_ARCADE}" -p "${SYSTEM_NAME}" -s "${SCRAPER}" -i "${ROM_DIR}"/"${SYSTEM_NAME}"
done
fi
if [ "${BUILD}" = true ]; then
@@ -100,7 +106,7 @@ if [ "${SYSTEM_NAME}" = pcenginecd ]; then
if test -d "${ROM_DIR}"/pcenginecd; then
if [ "$SCRAP" = true ]; then
for SCRAPER in $CONSOLE_SCRAPERS; do
Skyscraper --flags videos,unattend,noresize,unpack -p pcengine -s "$SCRAPER" -i "${ROM_DIR}"/pcenginecd
Skyscraper --flags "${SCRAP_FLAGS_CONSOLE}" -p pcengine -s "$SCRAPER" -i "${ROM_DIR}"/pcenginecd
done
fi
if [ "$BUILD" = true ]; then
@@ -114,7 +120,7 @@ if [ "${SYSTEM_NAME}" = arcade ]; then
if test -d "${ROM_DIR}"/arcade; then
if [ "$SCRAP" = true ]; then
for SCRAPER in $ARCADE_SCRAPERS; do
Skyscraper --flags videos,unattend,noresize -p fba -s "$SCRAPER" -i "${ROM_DIR}"/arcade
Skyscraper --flags "${SCRAP_FLAGS_ARCADE}" -p fba -s "$SCRAPER" -i "${ROM_DIR}"/arcade
done
fi
if [ "$BUILD" = true ]; then