|
| 1 | +#!/usr/bin/env bash |
| 2 | + |
| 3 | +set -euo pipefail |
| 4 | + |
| 5 | +decode_uri_filename() { |
| 6 | + while read; do |
| 7 | + echo -e "${REPLY//%/\\x}" |
| 8 | + done |
| 9 | +} |
| 10 | + |
| 11 | +dl() { |
| 12 | + local -r url="$1" |
| 13 | + local filename |
| 14 | + if [[ $# -eq 2 ]]; then |
| 15 | + filename="$2" |
| 16 | + else |
| 17 | + filename="$(basename "$url" | decode_uri_filename)" |
| 18 | + fi |
| 19 | + |
| 20 | + local -a curl_args=(-L --fail --remote-time -o "$filename" -#) |
| 21 | + if [[ -f "$filename" ]]; then |
| 22 | + # Only re-download if the remote file is newer than the local one |
| 23 | + curl_args+=(-z "$filename") |
| 24 | + fi |
| 25 | + set -x |
| 26 | + curl "${curl_args[@]}" "$url" |
| 27 | + { set +x; } 2>/dev/null |
| 28 | +} |
| 29 | + |
| 30 | +declare -r RGH_OD_REPO="https://raw.githubusercontent.com/retrogamehandheld/OpenDingux/master" |
| 31 | +declare -r SEONG_RG350_REPO="https://raw.githubusercontent.com/SeongGino/RetroGame350-AppRepo/master" |
| 32 | + |
| 33 | +mkdir -p dl/od_local_pack/ |
| 34 | +cd dl/od_local_pack/ |
| 35 | + |
| 36 | +# Most sources come from a list maintained here: |
| 37 | +# https://github.com/SeongGino/RetroGame350-AppRepo |
| 38 | + |
| 39 | +## Applications |
| 40 | + |
| 41 | +# ODcalc | Calculator |
| 42 | +dl https://github.com/Jakz/open-dingux-calculator/releases/latest/download/odcalc.opk |
| 43 | + |
| 44 | +# FFPlay | Video player |
| 45 | +dl "${RGH_OD_REPO}/Applications/FFPlay.opk" |
| 46 | + |
| 47 | +# Oldplay | Music player |
| 48 | +dl "${RGH_OD_REPO}/Applications/Oldplay.opk" |
| 49 | + |
| 50 | +# Bard | E-book reader |
| 51 | +dl "${RGH_OD_REPO}/Applications/Bard.opk" |
| 52 | + |
| 53 | +# Glutexto | Text editor |
| 54 | +dl "${RGH_OD_REPO}/Applications/Glutexto.opk" |
| 55 | + |
| 56 | +# GMU |
| 57 | +dl "${SEONG_RG350_REPO}/Applications/gmu-0.10.1-gcw0.opk" |
| 58 | + |
| 59 | +# ST-SDL | Terminal |
| 60 | +dl https://github.com/glebm/rs97_st-sdl/releases/latest/download/st-rg350.opk |
| 61 | + |
| 62 | +# HWTest | Input tester |
| 63 | +dl "${RGH_OD_REPO}/Applications/HWTest.opk" |
| 64 | + |
| 65 | +# Built as part of the buildroot: |
| 66 | +# * DinguxCommander |
| 67 | + |
| 68 | +## Emulators |
| 69 | +# Some renamed after download to default names used by SimpleMenu: |
| 70 | +# https://github.com/fgl82/simplemenu/blob/8102ffd50615837837f0a5f97d7fc32758689e01/simplemenu/configs/RG-350/config/sections.cfg |
| 71 | + |
| 72 | +# gambatte |
| 73 | +dl https://github.com/bardeci/dot-matrix-simulator/releases/download/20200127/gambatte-multi-r572u4-20200127.opk \ |
| 74 | + gambatte-gcw0-r572u3-20190718-004431.opk |
| 75 | + |
| 76 | +# fceux |
| 77 | +dl "${SEONG_RG350_REPO}/Emulators/FCEUX_2019-11-15.opk" \ |
| 78 | + fceux.opk |
| 79 | + |
| 80 | +# nestopia |
| 81 | +dl https://rs97.bitgala.xyz/RG-350/localpack/extra_apps/nestopia-28b16e5.opk |
| 82 | + |
| 83 | +# PocketSNES |
| 84 | +dl "${SEONG_RG350_REPO}/Emulators/PocketSNES_2019-12-12.opk" \ |
| 85 | + PocketSNES.opk |
| 86 | + |
| 87 | +# SMS Plus GX |
| 88 | +dl https://gameblabla.nl/files/ipk/gcw0/smsplus_gcw0.opk |
| 89 | + |
| 90 | +# Picodrive |
| 91 | +rm -f picodrive.opk |
| 92 | +dl https://gameblabla.nl/files/ipk/gcw0/picodrive_gcw0.opk \ |
| 93 | + picodrive.opk |
| 94 | + |
| 95 | +# Genesis Plus GX |
| 96 | +dl "${SEONG_RG350_REPO}/Emulators/GenesisPlusGX_2019-12-23.opk" \ |
| 97 | + GenplusGX.opk |
| 98 | + |
| 99 | +# ReGBA |
| 100 | +dl "${SEONG_RG350_REPO}/Emulators/ReGBA_2019-12-26.opk" \ |
| 101 | + Regba.opk |
| 102 | + |
| 103 | +# Temper | NEC PC-Engine/TurboGrafx-16, CD System |
| 104 | +dl https://gameblabla.nl/files/ipk/gcw0/temper_rs97_gcw0.opk \ |
| 105 | + temper1.24.opk |
| 106 | + |
| 107 | +# SmallPCFX | NEC PC-FX |
| 108 | +# TODO: https://github.com/gameblabla/pcfx-mednafen/ |
| 109 | + |
| 110 | +# Snes9x |
| 111 | +rm -f Snes9x_*.opk |
| 112 | +dl "${SEONG_RG350_REPO}/Emulators/Snes9x_2019-11-11.opk" |
| 113 | + |
| 114 | +# SwanEmu | Bandai Wonderswan (B/W, Color) |
| 115 | +dl https://gameblabla.nl/files/ipk/gcw0/swanemu_gcw0.opk |
| 116 | + |
| 117 | +# NEO4All | SNK Neo-Geo CD |
| 118 | +rm -f NEO4All*.opk |
| 119 | +dl "${SEONG_RG350_REPO}/Emulators/NEO4All_2019-12-16.opk" |
| 120 | + |
| 121 | +# NGPCEmu | SNK Neo-Geo Pocket (B/W, Color) |
| 122 | +dl https://gameblabla.nl/files/ipk/gcw0/ngpcemu_gcw0.opk |
| 123 | + |
| 124 | +# Retro8 |
| 125 | +dl https://github.com/Jakz/retro8/releases/download/0.1b/retro8_v1b_20200108.opk |
| 126 | + |
| 127 | +# ScummVM |
| 128 | +dl https://github.com/craigsc/scummvm-rg350/releases/download/v0.2/scummvm-rg350-01132020.opk |
| 129 | + |
| 130 | +# DOSBox |
| 131 | +dl "${SEONG_RG350_REPO}/Emulators/DOSBox_2019-11-11-launcher.opk" |
| 132 | + |
| 133 | +# midpath | J2ME emulator |
| 134 | +dl https://rs97.bitgala.xyz/RG-350/localpack/extra_apps/midpath_20170502_GCW0.opk |
| 135 | + |
| 136 | +# Built as part of the buildroot: |
| 137 | +# * pcsx4all |
| 138 | + |
| 139 | +## Ports (require additional data) |
| 140 | + |
| 141 | +# PRBoom+ | Doom |
| 142 | +dl 'https://github.com/Ninoh-FOX/PrBoom-plus-for-RG350/releases/latest/download/prboom+.opk' |
| 143 | + |
| 144 | +# EDuke32 | Duke Nukem 3D |
| 145 | +dl "${RGH_OD_REPO}/Games%20%26%20Ports/EDuke32.opk" |
| 146 | + |
| 147 | +# DevilutionX | Diablo |
| 148 | +dl https://github.com/diasurgical/devilutionX/releases/latest/download/devilutionx-rg350.opk |
| 149 | + |
| 150 | +## Games |
| 151 | + |
| 152 | +# Arkanoid |
| 153 | +dl "${RGH_OD_REPO}/Games%20%26%20Ports/Arkanoid.opk" |
| 154 | + |
| 155 | +# Blockrage |
| 156 | +dl "${RGH_OD_REPO}/Games%20%26%20Ports/Blockrage.opk" |
| 157 | + |
| 158 | +# Mr. Drillux |
| 159 | +dl https://github.com/jbanes/rs97-mrdrillux/releases/latest/download/mrdrillux.opk |
| 160 | + |
| 161 | +# Cave Story |
| 162 | +dl "${RGH_OD_REPO}/Games%20%26%20Ports/NXEngine.opk" |
| 163 | + |
| 164 | +# Slitherlink |
| 165 | +dl https://github.com/glebm/od-slitherlink/releases/latest/download/slitherlink-rg350.opk |
| 166 | + |
| 167 | +# Built as part of the buildroot |
| 168 | +# * BlockAttack |
| 169 | +# * Hocoslamfly |
| 170 | +# * Ghouls'n Ghosts Remix |
| 171 | + |
| 172 | +cd - |
0 commit comments