new skyscraper
This commit is contained in:
+92
-40
@@ -1,72 +1,124 @@
|
||||
#!/bin/bash
|
||||
ruta="/home/sergio/roms"
|
||||
scrap=true
|
||||
build=true
|
||||
console_art=artwork.xml.screenshot
|
||||
consolecd_art=artwork.xml.cover
|
||||
arcade_art=artwork.xml.wheel
|
||||
console_scrapers="screenscraper mobygames thegamesdb"
|
||||
arcade_scrapers="screenscraper arcadedb"
|
||||
|
||||
if [ "$1" = scrap ]; then
|
||||
build=false
|
||||
echo -e "\e[1m\e[41m## SCRAP ONLY \033[0m"
|
||||
#!/bin/bash
|
||||
|
||||
readonly USAGE="
|
||||
USAGE:
|
||||
$(basename "$0") [BUILD or SCRAPe] [PATH] [SYSTEM]"
|
||||
|
||||
function help_message() {
|
||||
echo "$USAGE"
|
||||
echo
|
||||
echo "Where [SYSTEM] are:"
|
||||
for WORD in $SYSTEMS; do
|
||||
echo -e "\t$WORD"
|
||||
done
|
||||
}
|
||||
|
||||
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
|
||||
if [ "$#" -ne 3 ]; then
|
||||
help_message
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# check if the parameter is valid
|
||||
if ! echo "$SYSTEMS" | grep -w "$1" >/dev/null; then
|
||||
printf "%s\n" "You must enter a valid SYSTEM name."
|
||||
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_WHITE=$(tput setaf 7)
|
||||
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 RESET_COLOR=$(tput sgr0)
|
||||
|
||||
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
|
||||
readonly CONSOLE_SCRAPERS="screenscrapER mobygames thegamesdb"
|
||||
readonly ARCADE_SCRAPERS="screenacraper arcadedb"
|
||||
readonly SCRAP=true
|
||||
readonly BUILD=true
|
||||
|
||||
if [ "$1" = SCRAP ]; then
|
||||
BUILD=false
|
||||
printf "%s\n" "${WHITE_COLOR}${RED_BACKGROUND_COLOR}## SCRAP ONLY ${RESET_COLOR}"
|
||||
sleep 1
|
||||
fi
|
||||
|
||||
if [ "$1" = build ]; then
|
||||
scrap=false
|
||||
echo -e "\e[1m\e[41m## BUILD ONLY \033[0m"
|
||||
if [ "$1" = BUILD ]; then
|
||||
SCRAP=false
|
||||
printf "%s\n" "${WHITE_COLOR}${RED_BACKGROUND_COLOR}## BUILD ONLY ${RESET_COLOR}"
|
||||
sleep 1
|
||||
fi
|
||||
|
||||
## CONSOLE
|
||||
console="atari2600 atarilynx fds gamegear gb gba gbc mastersystem megadrive msx nes ngp ngpc pcengine sega32x snes wonderswan wonderswancolor"
|
||||
CONSOLE="atari2600 atarilynx fds gamegear gb gba gbc mastersystem megadrive msx nes ngp ngpc pcengine sega32x snes wonderswan wonderswancolor"
|
||||
# atari2600 atarilynx fds gamegear gb gba gbc mastersystem megadrive msx nes ngp ngpc pcengine sega32x snes wonderswan wonderswancolor
|
||||
|
||||
for system in $console; do
|
||||
if [ "$scrap" = true ]; then
|
||||
for scraper in $console_scrapers; do
|
||||
Skyscraper --flags videos,unattend,noresize,unpack -p "${system}" -s "${scraper}"
|
||||
for SYSTEM in $CONSOLE; do
|
||||
if [ "$SCRAP" = true ]; then
|
||||
for SCRAPER in $CONSOLE_SCRAPERS; do
|
||||
Skyscraper --flags videos,unattend,noresize,unpack -p "${SYSTEM}" -s "${SCRAPER}"
|
||||
done
|
||||
fi
|
||||
if [ "$build" = true ]; then
|
||||
Skyscraper --flags videos,unattend,forcefilename,relative,skipexistingvideos -a $console_art -p "$system"
|
||||
#Skyscraper --flags videos,unattend,relative,skipexistingvideos -a $console_art -p $i
|
||||
if [ "$BUILD" = true ]; then
|
||||
Skyscraper --flags videos,unattend,forcefilename,relative,skipexistingvideos -a $CONSOLE_ART -p "$SYSTEM"
|
||||
#Skyscraper --flags videos,unattend,relative,skipexistingvideos -a $CONSOLE_ART -p $i
|
||||
fi
|
||||
done
|
||||
|
||||
## CONSOLE CD
|
||||
consolecd="pcengine psx segacd"
|
||||
CONSOLECD="pcengine psx segacd"
|
||||
# pcengine segacd psx saturn
|
||||
mv -v ${ruta}/pcengine ${ruta}/pcengine.cart
|
||||
mv -v ${ruta}/pcenginecd ${ruta}/pcengine
|
||||
mv -v "${ROM_DIR}"/pcengine "${ROM_DIR}"/pcengine.cart
|
||||
mv -v "${ROM_DIR}"/pcenginecd "${ROM_DIR}"/pcengine
|
||||
|
||||
for system in $consolecd; do
|
||||
if [ "$scrap" = true ]; then
|
||||
for scraper in $console_scrapers; do
|
||||
Skyscraper --flags videos,unattend,noresize -p "$system" -s "$scraper"
|
||||
for SYSTEM in $CONSOLECD; do
|
||||
if [ "$SCRAP" = true ]; then
|
||||
for SCRAPER in $CONSOLE_SCRAPERS; do
|
||||
Skyscraper --flags videos,unattend,noresize -p "$SYSTEM" -s "$SCRAPER"
|
||||
done
|
||||
fi
|
||||
if [ "$build" = true ]; then
|
||||
Skyscraper --flags videos,unattend,forcefilename,relative,skipexistingvideos,nobrackets -a $consolecd_art -p "$system"
|
||||
if [ "$BUILD" = true ]; then
|
||||
Skyscraper --flags videos,unattend,forcefilename,relative,skipexistingvideos,nobrackets -a $CONSOLECD_ART -p "$SYSTEM"
|
||||
fi
|
||||
done
|
||||
|
||||
mv -v ${ruta}/pcengine ${ruta}/pcenginecd
|
||||
mv -v ${ruta}/pcengine.cart ${ruta}/pcengine
|
||||
mv -v "${ROM_DIR}"/pcengine "${ROM_DIR}"/pcenginecd
|
||||
mv -v "${ROM_DIR}"/pcengine.cart "${ROM_DIR}"/pcengine
|
||||
|
||||
## ARCADE
|
||||
arcade="fba neogeo mame-advmame mame-mame4all"
|
||||
# fba neogeo mame-advmame mame-mame4all
|
||||
for system in $arcade; do
|
||||
if [ "$scrap" = true ]; then
|
||||
for scrapper in $arcade_scrapers; do
|
||||
Skyscraper --flags videos,unattend,noresize -p "$system" -s "$scrapper"
|
||||
for SYSTEM in $arcade; do
|
||||
if [ "$SCRAP" = true ]; then
|
||||
for SCRAPper in $ARCADE_SCRAPERS; do
|
||||
Skyscraper --flags videos,unattend,noresize -p "$SYSTEM" -s "$SCRAPper"
|
||||
done
|
||||
fi
|
||||
if [ "$build" = true ]; then
|
||||
Skyscraper --flags videos,unattend,relative,skipexistingvideos,nobrackets -a $arcade_art -p "$system"
|
||||
if [ "$BUILD" = true ]; then
|
||||
Skyscraper --flags videos,unattend,relative,skipexistingvideos,nobrackets -a $ARCADE_ART -p "$SYSTEM"
|
||||
fi
|
||||
done
|
||||
|
||||
@@ -154,4 +206,4 @@ done
|
||||
# x1
|
||||
# zmachine
|
||||
# zx81
|
||||
# zxspectrum
|
||||
# zxspectrum
|
||||
Reference in New Issue
Block a user