From 80d83da69b6d9ecca20c9400c06140e51c0a9c6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Valor=20Mart=C3=ADnez?= Date: Sun, 31 Jan 2021 23:15:36 +0100 Subject: [PATCH] update --- .DS_Store | Bin 6148 -> 0 bytes chd_from_7z.sh | 29 --- chd_from_zip.sh | 29 --- create_retroarch_chd_playlist.sh | 312 ----------------------------- create_retroarch_thumbnails.sh | 298 --------------------------- create_retroarch_thumbnails_all.sh | 33 --- monitorize_save_file.sh | 49 ----- skyscraper.sh | 229 --------------------- skyscraper_old.sh | 218 -------------------- skyscraper_system.sh | 133 ------------ 10 files changed, 1330 deletions(-) delete mode 100644 .DS_Store delete mode 100755 chd_from_7z.sh delete mode 100755 chd_from_zip.sh delete mode 100755 create_retroarch_chd_playlist.sh delete mode 100755 create_retroarch_thumbnails.sh delete mode 100755 create_retroarch_thumbnails_all.sh delete mode 100755 monitorize_save_file.sh delete mode 100755 skyscraper.sh delete mode 100755 skyscraper_old.sh delete mode 100755 skyscraper_system.sh diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index 5008ddfcf53c02e82d7eee2e57c38e5672ef89f6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0/dev/null; then - printf "%s\n" "You must enter a valid system name." - help_message - exit 0 -fi - -#readonly SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" -readonly SYSTEM="$1" -readonly ROM_FOLDER="$2" -readonly PLAYLISTS_FOLDER="$3" -readonly BASE_PATH="/Users/sergio/Roms/roms.retroachievements.2020/" - -if ! test -d "${ROM_FOLDER}"/"${SYSTEM}"; then - echo "${ROM_FOLDER}"/"${SYSTEM}" does not exists - exit 0 -fi - -case $SYSTEM in - -3do) - readonly PLAYLIST_NAME="" - ;; -3ds) - readonly PLAYLIST_NAME="" - ;; -amiga) - readonly PLAYLIST_NAME="" - ;; -amstradcpc) - readonly PLAYLIST_NAME="" - ;; -apple2) - readonly PLAYLIST_NAME="" - ;; -arcade) - readonly PLAYLIST_NAME="FBNeo - Arcade Games" - ;; -arcadia) - readonly PLAYLIST_NAME="" - ;; -astrocde) - readonly PLAYLIST_NAME="" - ;; -atari800) - readonly PLAYLIST_NAME="" - ;; -atari2600) - readonly PLAYLIST_NAME="Atari - 2600" - ;; -atari5200) - readonly PLAYLIST_NAME="" - ;; -atari7800) - readonly PLAYLIST_NAME="Atari - 7800" - ;; -atarijaguar) - readonly PLAYLIST_NAME="" - ;; -atarilynx) - readonly PLAYLIST_NAME="Atari - Lynx" - ;; -atarist) - readonly PLAYLIST_NAME="" - ;; -c16) - readonly PLAYLIST_NAME="" - ;; -c64) - readonly PLAYLIST_NAME="" - ;; -c128) - readonly PLAYLIST_NAME="" - ;; -coco) - readonly PLAYLIST_NAME="" - ;; -coleco) - readonly PLAYLIST_NAME="Coleco - ColecoVision" - ;; -daphne) - readonly PLAYLIST_NAME="" - ;; -dragon32) - readonly PLAYLIST_NAME="" - ;; -dreamcast) - readonly PLAYLIST_NAME="" - ;; -fba) - readonly PLAYLIST_NAME="" - ;; -fds) - readonly PLAYLIST_NAME="" - ;; -gameandwatch) - readonly PLAYLIST_NAME="" - ;; -gamegear) - readonly PLAYLIST_NAME="Sega - Game Gear" - ;; -gb) - readonly PLAYLIST_NAME="Nintendo - Game Boy" - ;; -gba) - readonly PLAYLIST_NAME="Nintendo - Game Boy Advance" - ;; -gbc) - readonly PLAYLIST_NAME="Nintendo - Game Boy Color" - ;; -gc) - readonly PLAYLIST_NAME="" - ;; -genesis) - readonly PLAYLIST_NAME="" - ;; -intellivision) - readonly PLAYLIST_NAME="" - ;; -mame-advmame) - readonly PLAYLIST_NAME="" - ;; -mame-libretro) - readonly PLAYLIST_NAME="" - ;; -mame-mame4all) - readonly PLAYLIST_NAME="" - ;; -mastersystem) - readonly PLAYLIST_NAME="Sega - Master System - Mark III" - ;; -megacd) - readonly PLAYLIST_NAME="Sega - Mega-CD - Sega CD" - ;; -megadrive) - readonly PLAYLIST_NAME="Sega - Mega Drive - Genesis" - ;; -msx) - readonly PLAYLIST_NAME="Microsoft - MSX" - ;; -msx2) - readonly PLAYLIST_NAME="Microsoft - MSX2" - ;; -n64) - readonly PLAYLIST_NAME="Nintendo - Nintendo 64" - ;; -nds) - readonly PLAYLIST_NAME="Nintendo - Nintendo DS" - ;; -neogeo) - readonly PLAYLIST_NAME="" - ;; -nes) - readonly PLAYLIST_NAME="Nintendo - Nintendo Entertainment System" - ;; -ngp) - readonly PLAYLIST_NAME="SNK - Neo Geo Pocket" - ;; -ngpc) - readonly PLAYLIST_NAME="SNK - Neo Geo Pocket Color" - ;; -oric) - readonly PLAYLIST_NAME="" - ;; -pc) - readonly PLAYLIST_NAME="" - ;; -pc88) - readonly PLAYLIST_NAME="" - ;; -pc98) - readonly PLAYLIST_NAME="" - ;; -pcfx) - readonly PLAYLIST_NAME="" - ;; -pcengine) - readonly PLAYLIST_NAME="NEC - PC Engine - TurboGrafx 16" - ;; -pcenginecd) - readonly PLAYLIST_NAME="NEC - PC Engine CD" - ;; -pokemini) - readonly PLAYLIST_NAME="" - ;; -ports) - readonly PLAYLIST_NAME="" - ;; -ps2) - readonly PLAYLIST_NAME="" - ;; -psp) - readonly PLAYLIST_NAME="" - ;; -psx) - readonly PLAYLIST_NAME="Sony - PlayStation" - ;; -saturn) - readonly PLAYLIST_NAME="" - ;; -scummvm) - readonly PLAYLIST_NAME="" - ;; -sega32x) - readonly PLAYLIST_NAME="" - ;; -segacd) - readonly PLAYLIST_NAME="Sega - Mega-CD - Sega CD" - ;; -sg-1000) - readonly PLAYLIST_NAME="Sega - SG-1000" - ;; -snes) - readonly PLAYLIST_NAME="Nintendo - Super Nintendo Entertainment System" - ;; -steam) - readonly PLAYLIST_NAME="" - ;; -ti99) - readonly PLAYLIST_NAME="" - ;; -trs-80) - readonly PLAYLIST_NAME="" - ;; -vectrex) - readonly PLAYLIST_NAME="" - ;; -vic20) - readonly PLAYLIST_NAME="" - ;; -videopac) - readonly PLAYLIST_NAME="" - ;; -virtualboy) - readonly PLAYLIST_NAME="" - ;; -wii) - readonly PLAYLIST_NAME="" - ;; -wonderswan) - readonly PLAYLIST_NAME="Bandai - WonderSwan" - ;; -wonderswancolor) - readonly PLAYLIST_NAME="Bandai - WonderSwan Color" - ;; -x68000) - readonly PLAYLIST_NAME="" - ;; -x1) - readonly PLAYLIST_NAME="" - ;; -zmachine) - readonly PLAYLIST_NAME="" - ;; -zx81) - readonly PLAYLIST_NAME="" - ;; -zxspectrum) - readonly PLAYLIST_NAME="" - ;; - -esac - -if test -f "${PLAYLISTS_FOLDER}"/"${PLAYLIST_NAME}".lpl; then - rm "${PLAYLISTS_FOLDER}"/"${PLAYLIST_NAME}".lpl -fi -touch "${PLAYLISTS_FOLDER}"/"${PLAYLIST_NAME}".lpl - -(echo "{"; -echo " \"version\": \"1.4\","; -echo " \"default_core_path\": \"\","; -echo " \"default_core_name\": \"\","; -echo " \"label_display_mode\": 0,"; -echo " \"right_thumbnail_mode\": 0,"; -echo " \"left_thumbnail_mode\": 0,"; -echo " \"sort_mode\": 0,"; -echo " \"items\": [") >>"${PLAYLISTS_FOLDER}"/"${PLAYLIST_NAME}".lpl -for CHDFILE in "${ROM_FOLDER}"/*.chd; do - GAMENAME="$(basename "$CHDFILE" .chd)" - FOLDER="$(basename "$ROM_FOLDER")" - (echo " {"; - echo " \"path\": \"${BASE_PATH}/${FOLDER}/${GAMENAME}.chd\","; - echo " \"label\": \"${GAMENAME}\","; - echo " \"core_path\": \"DETECT\","; - echo " \"core_name\": \"DETECT\","; - echo " \"db_name\": \"${PLAYLIST_NAME}.lpl\""; - echo " },") >>"${PLAYLISTS_FOLDER}"/"${PLAYLIST_NAME}".lpl -done -(echo " ]"; -echo "}") >>"${PLAYLISTS_FOLDER}"/"${PLAYLIST_NAME}".lpl diff --git a/create_retroarch_thumbnails.sh b/create_retroarch_thumbnails.sh deleted file mode 100755 index 668332d..0000000 --- a/create_retroarch_thumbnails.sh +++ /dev/null @@ -1,298 +0,0 @@ -#!/bin/bash -function help_message() { - echo "$USAGE" - echo - echo "Where [SYSTEMS] are:" - for WORD in $SYSTEMS; do - echo -e "\t$WORD" - done -} - -readonly USAGE=" -USAGE: -$(basename "$0") [SYSTEM] [ROM_FOLDER] [THUMBNAILS_FOLDER]" - -readonly SYSTEMS="pcenginecd 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" - -# check if there are all the parameters -if [ "$#" -ne 3 ]; then - help_message - exit 0 -fi - -# check if the system 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 - -if ! test -d "${ROM_FOLDER}"/"${SYSTEM}"; then - echo "${ROM_FOLDER}"/"${SYSTEM}" does not exists - exit 0 -fi - -#readonly SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" -readonly SYSTEM="$1" -readonly ROM_FOLDER="$2" -readonly THUMBNAILS_FOLDER="$3" - -case $SYSTEM in - -3do) - readonly PLAYLIST_NAME="" - ;; -3ds) - readonly PLAYLIST_NAME="" - ;; -amiga) - readonly PLAYLIST_NAME="" - ;; -amstradcpc) - readonly PLAYLIST_NAME="" - ;; -apple2) - readonly PLAYLIST_NAME="" - ;; -arcade) - readonly PLAYLIST_NAME="FBNeo - Arcade Games" - ;; -arcadia) - readonly PLAYLIST_NAME="" - ;; -astrocde) - readonly PLAYLIST_NAME="" - ;; -atari800) - readonly PLAYLIST_NAME="" - ;; -atari2600) - readonly PLAYLIST_NAME="Atari - 2600" - ;; -atari5200) - readonly PLAYLIST_NAME="" - ;; -atari7800) - readonly PLAYLIST_NAME="Atari - 7800" - ;; -atarijaguar) - readonly PLAYLIST_NAME="" - ;; -atarilynx) - readonly PLAYLIST_NAME="Atari - Lynx" - ;; -atarist) - readonly PLAYLIST_NAME="" - ;; -c16) - readonly PLAYLIST_NAME="" - ;; -c64) - readonly PLAYLIST_NAME="" - ;; -c128) - readonly PLAYLIST_NAME="" - ;; -coco) - readonly PLAYLIST_NAME="" - ;; -coleco) - readonly PLAYLIST_NAME="Coleco - ColecoVision" - ;; -daphne) - readonly PLAYLIST_NAME="" - ;; -dragon32) - readonly PLAYLIST_NAME="" - ;; -dreamcast) - readonly PLAYLIST_NAME="" - ;; -fba) - readonly PLAYLIST_NAME="" - ;; -fds) - readonly PLAYLIST_NAME="" - ;; -gameandwatch) - readonly PLAYLIST_NAME="" - ;; -gamegear) - readonly PLAYLIST_NAME="Sega - Game Gear" - ;; -gb) - readonly PLAYLIST_NAME="Nintendo - Game Boy" - ;; -gba) - readonly PLAYLIST_NAME="Nintendo - Game Boy Advance" - ;; -gbc) - readonly PLAYLIST_NAME="Nintendo - Game Boy Color" - ;; -gc) - readonly PLAYLIST_NAME="" - ;; -genesis) - readonly PLAYLIST_NAME="" - ;; -intellivision) - readonly PLAYLIST_NAME="" - ;; -mame-advmame) - readonly PLAYLIST_NAME="" - ;; -mame-libretro) - readonly PLAYLIST_NAME="" - ;; -mame-mame4all) - readonly PLAYLIST_NAME="" - ;; -mastersystem) - readonly PLAYLIST_NAME="Sega - Master System - Mark III" - ;; -megacd) - readonly PLAYLIST_NAME="Sega - Mega-CD - Sega CD" - ;; -megadrive) - readonly PLAYLIST_NAME="Sega - Mega Drive - Genesis" - ;; -msx) - readonly PLAYLIST_NAME="Microsoft - MSX" - ;; -msx2) - readonly PLAYLIST_NAME="Microsoft - MSX2" - ;; -n64) - readonly PLAYLIST_NAME="Nintendo - Nintendo 64" - ;; -nds) - readonly PLAYLIST_NAME="Nintendo - Nintendo DS" - ;; -neogeo) - readonly PLAYLIST_NAME="" - ;; -nes) - readonly PLAYLIST_NAME="Nintendo - Nintendo Entertainment System" - ;; -ngp) - readonly PLAYLIST_NAME="SNK - Neo Geo Pocket" - ;; -ngpc) - readonly PLAYLIST_NAME="SNK - Neo Geo Pocket Color" - ;; -oric) - readonly PLAYLIST_NAME="" - ;; -pc) - readonly PLAYLIST_NAME="" - ;; -pc88) - readonly PLAYLIST_NAME="" - ;; -pc98) - readonly PLAYLIST_NAME="" - ;; -pcfx) - readonly PLAYLIST_NAME="" - ;; -pcengine) - readonly PLAYLIST_NAME="NEC - PC Engine - TurboGrafx 16" - ;; -pcenginecd) - readonly PLAYLIST_NAME="NEC - PC Engine CD" - ;; -pokemini) - readonly PLAYLIST_NAME="" - ;; -ports) - readonly PLAYLIST_NAME="" - ;; -ps2) - readonly PLAYLIST_NAME="" - ;; -psp) - readonly PLAYLIST_NAME="" - ;; -psx) - readonly PLAYLIST_NAME="Sony - PlayStation" - ;; -saturn) - readonly PLAYLIST_NAME="" - ;; -scummvm) - readonly PLAYLIST_NAME="" - ;; -sega32x) - readonly PLAYLIST_NAME="" - ;; -segacd) - readonly PLAYLIST_NAME="Sega - Mega-CD - Sega CD" - ;; -sg-1000) - readonly PLAYLIST_NAME="Sega - SG-1000" - ;; -snes) - readonly PLAYLIST_NAME="Nintendo - Super Nintendo Entertainment System" - ;; -steam) - readonly PLAYLIST_NAME="" - ;; -ti99) - readonly PLAYLIST_NAME="" - ;; -trs-80) - readonly PLAYLIST_NAME="" - ;; -vectrex) - readonly PLAYLIST_NAME="" - ;; -vic20) - readonly PLAYLIST_NAME="" - ;; -videopac) - readonly PLAYLIST_NAME="" - ;; -virtualboy) - readonly PLAYLIST_NAME="" - ;; -wii) - readonly PLAYLIST_NAME="" - ;; -wonderswan) - readonly PLAYLIST_NAME="Bandai - WonderSwan" - ;; -wonderswancolor) - readonly PLAYLIST_NAME="Bandai - WonderSwan Color" - ;; -x68000) - readonly PLAYLIST_NAME="" - ;; -x1) - readonly PLAYLIST_NAME="" - ;; -zmachine) - readonly PLAYLIST_NAME="" - ;; -zx81) - readonly PLAYLIST_NAME="" - ;; -zxspectrum) - readonly PLAYLIST_NAME="" - ;; - -esac - -if test -d "${THUMBNAILS_FOLDER}"/"${PLAYLIST_NAME}"; then - rm -rdf "${THUMBNAILS_FOLDER:?}"/"${PLAYLIST_NAME:?}" -fi - -mkdir -p "${THUMBNAILS_FOLDER}"/"${PLAYLIST_NAME}" -mkdir -p "${THUMBNAILS_FOLDER}"/"${PLAYLIST_NAME}"/Named_Boxarts -mkdir -p "${THUMBNAILS_FOLDER}"/"${PLAYLIST_NAME}"/Named_Snaps -mkdir -p "${THUMBNAILS_FOLDER}"/"${PLAYLIST_NAME}"/Named_Titles - -cp -v "${ROM_FOLDER}"/"${SYSTEM}"/media/covers/* "${THUMBNAILS_FOLDER}"/"${PLAYLIST_NAME}"/Named_Boxarts -cp -v "${ROM_FOLDER}"/"${SYSTEM}"/media/screenshots/* "${THUMBNAILS_FOLDER}"/"${PLAYLIST_NAME}"/Named_Snaps - -rename s-[\&\*\:\`\<\>\?\\\|]-_- "${THUMBNAILS_FOLDER}"/"${PLAYLIST_NAME}"/Named_Boxarts/* -rename s-[\&\*\:\`\<\>\?\\\|]-_- "${THUMBNAILS_FOLDER}"/"${PLAYLIST_NAME}"/Named_Snaps/* diff --git a/create_retroarch_thumbnails_all.sh b/create_retroarch_thumbnails_all.sh deleted file mode 100755 index 4810f08..0000000 --- a/create_retroarch_thumbnails_all.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash -function help_message() { - echo "$USAGE" - echo - echo "Where [SYSTEMS] are:" - for WORD in $SYSTEMS; do - echo -e "\t$WORD" - done -} - -readonly USAGE=" -USAGE: -$(basename "$0") [ROM_FOLDER] [THUMBNAILS_FOLDER]" - -# check if there are all the parameters -if [ "$#" -ne 2 ]; then - help_message - exit 0 -fi - -if ! test -d "${ROM_FOLDER}"/"${SYSTEM}"; then - echo "${ROM_FOLDER}"/"${SYSTEM}" does not exists - exit 0 -fi - -readonly ROM_FOLDER="$1" -readonly THUMBNAILS_FOLDER="$2" -readonly SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" -readonly SYSTEMS="pcenginecd 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" - -for SYSTEM in $SYSTEMS; do - "${SCRIPT_DIR}"/create_retroarch_thumbnails.sh "${SYSTEM}" "${ROM_FOLDER}" "${THUMBNAILS_FOLDER}" -done diff --git a/monitorize_save_file.sh b/monitorize_save_file.sh deleted file mode 100755 index 0010667..0000000 --- a/monitorize_save_file.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/bash - -readonly USAGE=" -USAGE: -$(basename "$0") [FILE]" - -function help_message() { - echo "$USAGE" -} - -# check if there is any parameter -if [ "$#" -ne 1 ]; then - help_message - exit 0 -fi - -# check if the parameter is valid -if ! test -f "$1"; then - echo "File $1 does not exist." - exit 0 -fi - -# variables -readonly FILE_DIR="$(cd "$(dirname "$1")" && pwd)" -readonly FILE="$(basename "$1")" - -OLD_DATE="$(date -r "$1" "+%Y-%m-%d_%H:%M:%S")" -cp "${FILE_DIR}/${FILE}" "${FILE_DIR}/${FILE}.${OLD_DATE}" -if ! test -f "${FILE_DIR}/${FILE}.tar"; then - tar -C "${FILE_DIR}" -cf "${FILE_DIR}/${FILE}.tar" "${FILE}.${OLD_DATE}" - echo "File ${FILE}.tar created." - echo "${FILE}.${OLD_DATE}" -else - tar -C "${FILE_DIR}" -rf "${FILE_DIR}/${FILE}.tar" "${FILE}.${OLD_DATE}" - echo "${FILE}.${OLD_DATE}" -fi -rm "${FILE_DIR}/${FILE}.${OLD_DATE}" - -while true; do - sleep 5 - DATE="$(date -r "$1" "+%Y-%m-%d_%H:%M:%S")" - if [ "$DATE" != "$OLD_DATE" ]; then - echo "${FILE}.${DATE}" - cp "${FILE_DIR}/${FILE}" "${FILE_DIR}/${FILE}.${DATE}" - tar -C "${FILE_DIR}" -rf "${FILE_DIR}/${FILE}.tar" "${FILE}.${DATE}" - rm "${FILE_DIR}/${FILE}.${DATE}" - OLD_DATE=$DATE - fi -done diff --git a/skyscraper.sh b/skyscraper.sh deleted file mode 100755 index 4af67b6..0000000 --- a/skyscraper.sh +++ /dev/null @@ -1,229 +0,0 @@ -#!/bin/bash -readonly USAGE=" -USAGE: -$(basename "$0") [BUILD | SCRAP | BOTH] [FRONTEND] [PATH]" - -function help_message() { - echo "$USAGE" - echo - echo "Where [FRONTEND] are:" - for WORD in $FRONTENDS; do - echo -e "\t$WORD" - done -} - -FRONTENDS="emulationstation pegasus" - -# check if there are all the parameters -if [ "$#" -ne 3 ]; then - help_message - exit 0 -fi - -# check if the frontend parameter is valid -if ! echo "$FRONTENDS" | grep -w "$2" >/dev/null; then - printf "%s\n" "You must enter a valid FRONTEND 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 FRONTEND="$2" -readonly ROM_DIR="$3" - -readonly CONSOLE_ART=artwork.xml.rgbpi -readonly ARCADE_ART=artwork.xml.rgbpi - -readonly CONSOLE_SCRAPERS="screenscraper mobygames thegamesdb" -readonly ARCADE_SCRAPERS="screenacraper arcadedb" - -#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" - -SCRAP=true -BUILD=true - -if [ "$1" = scrap ] || [ "$1" = SCRAP ]; then - BUILD=false - printf "%s\n" "${COLOR_WHITE}${COLOR_BACKGROUND_RED}## SCRAP ONLY ${RESET_COLOR}" - sleep 1 -fi - -if [ "$1" = build ] || [ "$1" = BUILD ]; then - SCRAP=false - printf "%s\n" "${COLOR_WHITE}${COLOR_BACKGROUND_RED}## BUILD ONLY ${RESET_COLOR}" - sleep 1 -fi - -if [ "$1" = both ] || [ "$1" = BOTH ]; then - SCRAP=true - BUILD=true - printf "%s\n" "${COLOR_WHITE}${COLOR_BACKGROUND_RED}## SCRAP and BUILD ${RESET_COLOR}" - 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}" - done - fi - if [ "$BUILD" = true ]; then - Skyscraper --flags "${BUILD_FLAGS_CONSOLE}" -a $CONSOLE_ART -p "$SYSTEM" -f "${FRONTEND}" -i "${ROM_DIR}"/"${SYSTEM}" - fi - fi -done - -## arcade systems -ARCADE="fba neogeo mame-advmame mame-mame4all" -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}" - done - fi - if [ "$BUILD" = true ]; then - Skyscraper --flags "${BUILD_FLAGS_ARCADE}" -a $ARCADE_ART -p "$SYSTEM" -f "${FRONTEND}" -i "${ROM_DIR}"/"${SYSTEM}" - fi - fi -done - -## pcenginecd folder -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 - done - fi - if [ "$BUILD" = true ]; then - Skyscraper --flags "${BUILD_FLAGS_CONSOLE}" -a $CONSOLE_ART -p pcengine -f "${FRONTEND}" -i "${ROM_DIR}"/pcenginecd - fi -fi - -## arcade folder -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 - done - fi - if [ "$BUILD" = true ]; then - Skyscraper --flags "${BUILD_FLAGS_ARCADE}" -a $ARCADE_ART -p fba -f "${FRONTEND}" -i "${ROM_DIR}"/arcade - fi -fi - -## post-script job. add extensions text to pegasus -find "${ROM_DIR}" -type f -iname "metadata.pegasus.txt" -exec sed -i '2 a extensions: zip, chd, cue, iso, cso' {} \; - -## Available artworks -# artwork.xml.screenshot -# artwork.xml.cover -# artwork.xml.wheel -# artwork.xml.example1 - -## Available platforms: -# 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 diff --git a/skyscraper_old.sh b/skyscraper_old.sh deleted file mode 100755 index c2c2068..0000000 --- a/skyscraper_old.sh +++ /dev/null @@ -1,218 +0,0 @@ -#!/bin/bash -readonly USAGE=" -USAGE: -$(basename "$0") [BUILD | SCRAP | BOTH] [FRONTEND] [PATH]" - -function help_message() { - echo "$USAGE" - echo - echo "Where [FRONTEND] are:" - for WORD in $FRONTENDS; do - echo -e "\t$WORD" - done -} - -FRONTENDS="emulationstation pegasus" - -# check if there are all the parameters -if [ "$#" -ne 3 ]; then - help_message - exit 0 -fi - -# check if the frontend parameter is valid -if ! echo "$FRONTENDS" | grep -w "$2" >/dev/null; then - printf "%s\n" "You must enter a valid FRONTEND 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 FRONTEND="$2" -readonly ROM_DIR="$3" - -readonly CONSOLE_ART=artwork.xml.example2 -readonly CONSOLECD_ART=artwork.xml.example2 -readonly ARCADE_ART=artwork.xml.example2 - -readonly CONSOLE_SCRAPERS="screenscraper mobygames thegamesdb" -readonly ARCADE_SCRAPERS="screenacraper arcadedb" - -SCRAP=true -BUILD=true - -if [ "$1" = scrap ] || [ "$1" = SCRAP ]; then - BUILD=false - printf "%s\n" "${COLOR_WHITE}${COLOR_BACKGROUND_RED}## SCRAP ONLY ${RESET_COLOR}" - sleep 1 -fi - -if [ "$1" = build ] || [ "$1" = BUILD ]; then - SCRAP=false - printf "%s\n" "${COLOR_WHITE}${COLOR_BACKGROUND_RED}## BUILD ONLY ${RESET_COLOR}" - sleep 1 -fi - -if [ "$1" = both ] || [ "$1" = BOTH ]; then - SCRAP=true - BUILD=true - printf "%s\n" "${COLOR_WHITE}${COLOR_BACKGROUND_RED}## SCRAP and BUILD ${RESET_COLOR}" - 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 -CONSOLE="atari2600 atarilynx dreamcast fds gamegear gb gba gbc mastersystem megadrive msx nds nes ngp ngpc pcengine psp saturn 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}" -i "${ROM_DIR}"/"${SYSTEM_NAME}" - done - fi - if [ "$BUILD" = true ]; then - Skyscraper --flags videos,unattend,forcefilename,relative,skipexistingvideos -a $CONSOLE_ART -p "$SYSTEM" -f "${FRONTEND}" -i "${ROM_DIR}"/"${SYSTEM_NAME}" - #Skyscraper --flags videos,unattend,relative,skipexistingvideos -a $CONSOLE_ART -p $i - fi -done - -## CONSOLE CD -CONSOLECD="pcengine psx segacd" -# pcengine segacd psx saturn -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" -i "${ROM_DIR}"/"${SYSTEM_NAME}" - done - fi - if [ "$BUILD" = true ]; then - Skyscraper --flags videos,unattend,forcefilename,relative,skipexistingvideos,nobrackets -a $CONSOLECD_ART -p "$SYSTEM" -f "${FRONTEND}" -i "${ROM_DIR}"/"${SYSTEM_NAME}" - fi -done - -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 SCRAPER in $ARCADE_SCRAPERS; do - Skyscraper --flags videos,unattend,noresize -p "$SYSTEM" -s "$SCRAPER" -i "${ROM_DIR}"/"${SYSTEM_NAME}" - done - fi - if [ "$BUILD" = true ]; then - Skyscraper --flags videos,unattend,relative,skipexistingvideos,nobrackets -a $ARCADE_ART -p "$SYSTEM" -f "${FRONTEND}" -i "${ROM_DIR}"/"${SYSTEM_NAME}" - fi -done - -## Available artworks -# artwork.xml.screenshot -# artwork.xml.cover -# artwork.xml.wheel -# artwork.xml.example1 - -## Available platforms: -# 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 diff --git a/skyscraper_system.sh b/skyscraper_system.sh deleted file mode 100755 index 7ec4887..0000000 --- a/skyscraper_system.sh +++ /dev/null @@ -1,133 +0,0 @@ -#!/bin/bash -readonly USAGE=" -USAGE: -$(basename "$0") [BUILD or SCRAP] [PATH] [SYSTEM]" - -function help_message() { - echo "$USAGE" - echo - echo "Where [SYSTEM] are:" - for WORD in $SYSTEMS; do - echo -e "\t$WORD" - done -} - -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" - -# 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." - 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_NAME="$3" -readonly FRONTEND="emulationstation" - -readonly CONSOLE_ART=artwork.xml.retroarch -readonly ARCADE_ART=artwork.xml.retroarch - -readonly CONSOLE_SCRAPERS="screenscraper mobygames thegamesdb" -readonly ARCADE_SCRAPERS="screenacraper arcadedb" - -readonly BUILD_FLAGS_CONSOLE="unattend,forcefilename,relative" -readonly BUILD_FLAGS_ARCADE="unattend,relative" - -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" -readonly ARCADE="arcade fba neogeo mame-advmame mame-mame4all" - -SCRAP=true -BUILD=true - -if [ "$1" = scrap ] || [ "$1" = SCRAP ]; then - BUILD=false - printf "%s\n" "${COLOR_WHITE}${COLOR_BACKGROUND_RED}## SCRAP ONLY ${RESET_COLOR}" - sleep 1 -fi - -if [ "$1" = build ] || [ "$1" = BUILD ]; then - SCRAP=false - printf "%s\n" "${COLOR_WHITE}${COLOR_BACKGROUND_RED}## BUILD ONLY ${RESET_COLOR}" - sleep 1 -fi - -## console systems -if echo "${CONSOLE}" | grep -w "${SYSTEM_NAME}" >/dev/null; then - if [ "${SCRAP}" = true ]; then - for SCRAPER in ${CONSOLE_SCRAPERS}; do - Skyscraper --flags videos,unattend,noresize,unpack -p "${SYSTEM_NAME}" -s "${SCRAPER}" -i "${ROM_DIR}"/"${SYSTEM_NAME}" - done - fi - if [ "${BUILD}" = true ]; then - Skyscraper --flags "${BUILD_FLAGS_CONSOLE}" -a $CONSOLE_ART -p "${SYSTEM_NAME}" -f "${FRONTEND}" -i "${ROM_DIR}"/"${SYSTEM_NAME}" - fi - exit 0 -fi - -## arcade systems -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}" - done - fi - if [ "${BUILD}" = true ]; then - Skyscraper --flags "${BUILD_FLAGS_ARCADE}" -a $ARCADE_ART -p "${SYSTEM_NAME}" -f "${FRONTEND}" -i "${ROM_DIR}"/"${SYSTEM_NAME}" - fi - exit 0 -fi - -## pcenginecd folder -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 - done - fi - if [ "$BUILD" = true ]; then - Skyscraper --flags "${BUILD_FLAGS_CONSOLE}" -a $CONSOLE_ART -p pcengine -f "${FRONTEND}" -i "${ROM_DIR}"/pcenginecd - fi - fi -fi - -## arcade folder -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 - done - fi - if [ "$BUILD" = true ]; then - Skyscraper --flags "${BUILD_FLAGS_ARCADE}" -a $ARCADE_ART -p fba -f "${FRONTEND}" -i "${ROM_DIR}"/arcade - fi - fi -fi