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 -16
View File
@@ -1,7 +1,7 @@
#!/bin/bash
## usage
readonly USAGE="
USAGE="
USAGE:
$(basename "$0") [BUILD | SCRAP | BOTH] [FRONTEND] [PATH]"
@@ -13,6 +13,7 @@ function help_message() {
echo -e "\t$WORD"
done
}
readonly USAGE
## check if there are all the parameters
if [ "$#" -ne 3 ]; then
@@ -33,23 +34,26 @@ readonly FRONTEND="$2"
readonly ROM_DIR="$3"
## 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
## artwork.xml
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,nobrackets,skipexistingcovers,skipexistingmarquees,skipexistingscreenshots,skipexistingvideos,skipexistingwheels"
readonly BUILD_FLAGS_CONSOLE="videos,unattend,forcefilename,relative"
#readonly BUILD_FLAGS_ARCADE="videos,unattend,relative,nobrackets,skipexistingcovers,skipexistingmarquees,skipexistingscreenshots,skipexistingvideos,skipexistingwheels"
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"
## check if BUID, SCRAP or BOTH
if [ "$1" = scrap ] || [ "$1" = SCRAP ]; then
@@ -73,15 +77,13 @@ if [ "$1" = both ] || [ "$1" = BOTH ]; then
sleep 1
fi
#ALL_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"
## console systems
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"
for SYSTEM in $CONSOLE; do
if test -d "${ROM_DIR}"/"${SYSTEM}"; then
if [ "$SCRAP" = true ]; then
for SCRAPER in $CONSOLE_SCRAPERS; do
Skyscraper --flags videos,unattend,noresize,unpack -p "${SYSTEM}" -s "${SCRAPER}" -i "${ROM_DIR}"/"${SYSTEM}"
Skyscraper --flags "${SCRAP_FLAGS_CONSOLE}" -p "${SYSTEM}" -s "${SCRAPER}" -i "${ROM_DIR}"/"${SYSTEM}"
done
fi
if [ "$BUILD" = true ]; then
@@ -96,7 +98,7 @@ for SYSTEM in $ARCADE; do
if test -d "${ROM_DIR}"/"${SYSTEM}"; then
if [ "$SCRAP" = true ]; then
for SCRAPER in $ARCADE_SCRAPERS; do
Skyscraper --flags videos,unattend,noresize -p "$SYSTEM" -s "$SCRAPER" -i "${ROM_DIR}"/"${SYSTEM}"
Skyscraper --flags "${SCRAP_FLAGS_ARCADE}" -p "$SYSTEM" -s "$SCRAPER" -i "${ROM_DIR}"/"${SYSTEM}"
done
fi
if [ "$BUILD" = true ]; then
@@ -109,7 +111,7 @@ done
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
@@ -121,7 +123,7 @@ fi
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