Add an uninstall wrapper, and move to the stores org

uninstall.sh mirrors install.sh: it names the store and lets the engine do the
work, passing STORE_ID rather than a config URL. install.sh gained what the
Batocera wrapper already had — run from a checkout, it uses the config next to
it rather than the one on the forge.

Both wrappers are POSIX sh now, and neither pipes curl into a shell any more: a
failed download would feed an empty script to sh and look like success, so the
installer is fetched to a file and run from there.

The repository moved from the tools org to stores. The old raw URLs still
redirect.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-08-18 08:32:47 +02:00
co-authored by Claude Opus 5
parent 48aeeebaf7
commit 66ddf87d03
3 changed files with 71 additions and 12 deletions
+24 -5
View File
@@ -4,16 +4,16 @@ Puts the <https://teletypegames.org> catalog into RetroArch's library: two
playlists — *Teletype Games - Commodore 64* and *Teletype Games - TIC-80* — with playlists — *Teletype Games - Commodore 64* and *Teletype Games - TIC-80* — with
box art, on any machine RetroArch runs on. box art, on any machine RetroArch runs on.
This repository is only the store definition — `config.json` plus a wrapper This repository is only the store definition — `config.json` plus the two wrapper
installer. All the logic lives in the shared engine, scripts. All the logic lives in the shared engine,
[`warp-engine-retroarch-store`](https://git.teletypegames.org/tools/warp-engine-retroarch-store), [`warp-engine-retroarch-store`](https://git.teletypegames.org/stores/warp-engine-retroarch-store),
which works with any WarpEngine-based site; this is just the Teletype Games which works with any WarpEngine-based site; this is just the Teletype Games
configuration of it. configuration of it.
## Install ## Install
```sh ```sh
curl -fsSL https://git.teletypegames.org/tools/ttg-retroarch-store/raw/branch/master/install.sh | bash curl -fsSL https://git.teletypegames.org/stores/ttg-retroarch-store/raw/branch/master/install.sh | sh
``` ```
Or from a checkout of this repo: Or from a checkout of this repo:
@@ -55,6 +55,25 @@ Keep it current from `crontab`:
0 * * * * ~/.local/bin/ttg-retroarch-store sync >>~/.local/share/warp-engine-store/ttg/store.log 2>&1 0 * * * * ~/.local/bin/ttg-retroarch-store sync >>~/.local/share/warp-engine-store/ttg/store.log 2>&1
``` ```
## Uninstall
```sh
curl -fsSL https://git.teletypegames.org/stores/ttg-retroarch-store/raw/branch/master/uninstall.sh | sh
```
Or `./uninstall.sh` from a checkout. It takes out the six games, the two
playlists and their thumbnails, then the launcher and the store home. Close
RetroArch first, for the same reason as for a sync.
```sh
DRY_RUN=1 ./uninstall.sh # show what would go, remove nothing
KEEP_HOME=1 ./uninstall.sh # keep state.json and the log, for a reinstall
```
Nothing of yours goes with it: content you put in the `teletypegames/` folder
keeps its directory, a playlist that still has an entry of yours is rewritten
rather than deleted, and any `*.lpl.ttg-backup` is listed and left alone.
## What this store installs ## What this store installs
| Catalog platform | Playlist | Core | Extension | | Catalog platform | Playlist | Core | Extension |
@@ -73,7 +92,7 @@ Statuses `released` and `archived`, whole catalog, no owner filter — **six tit
That is the cartridge half of the catalog. Our other games are native builds and That is the cartridge half of the catalog. Our other games are native builds and
web builds, and no libretro core runs those — on a Batocera box they install as web builds, and no libretro core runs those — on a Batocera box they install as
Ports instead, see Ports instead, see
[`ttg-batocera-store`](https://git.teletypegames.org/tools/ttg-batocera-store). [`ttg-batocera-store`](https://git.teletypegames.org/stores/ttg-batocera-store).
Everything lands under the `teletypegames/` subfolder of RetroArch's content Everything lands under the `teletypegames/` subfolder of RetroArch's content
directory, so a prune can never reach content you put there yourself. To change directory, so a prune can never reach content you put there yourself. To change
+30 -7
View File
@@ -1,10 +1,33 @@
#!/bin/bash #!/bin/sh
# Install the Teletype Games store into this machine's RetroArch. # Install the Teletype Games store into this machine's RetroArch.
# #
# bash <(curl -fsSL https://git.teletypegames.org/tools/ttg-retroarch-store/raw/branch/master/install.sh) # curl -fsSL https://git.teletypegames.org/stores/ttg-retroarch-store/raw/branch/master/install.sh | sh
# #
# All the work is done by the engine's installer; this only says which store. # All the work is done by the shared engine; this script only says which store
set -euo pipefail # to install. See https://git.teletypegames.org/stores/warp-engine-retroarch-store
ENGINE_RAW_BASE="${ENGINE_RAW_BASE:-https://git.teletypegames.org/tools/warp-engine-retroarch-store/raw/branch/master}" #
export STORE_CONFIG="${STORE_CONFIG:-https://git.teletypegames.org/tools/ttg-retroarch-store/raw/branch/master/config.json}" set -eu
curl -fsSL "$ENGINE_RAW_BASE/install.sh" | bash
FORGE="${FORGE:-https://git.teletypegames.org/stores}"
ENGINE_RAW_BASE="${ENGINE_RAW_BASE:-$FORGE/warp-engine-retroarch-store/raw/branch/master}"
# Only set when run as a file; piped from curl "$0" is `sh`, and then nothing
# may come from whatever the cwd happens to hold.
SRC_DIR=""
if [ -f "$0" ]; then
SRC_DIR="$(cd "$(dirname "$(readlink -f "$0" 2>/dev/null || echo "$0")")" && pwd)"
fi
# Prefer the config next to this script when run from a checkout.
if [ -z "${STORE_CONFIG:-}" ] && [ -n "$SRC_DIR" ] && [ -f "$SRC_DIR/config.json" ]; then
STORE_CONFIG="$SRC_DIR/config.json"
else
STORE_CONFIG="${STORE_CONFIG:-$FORGE/ttg-retroarch-store/raw/branch/master/config.json}"
fi
export STORE_CONFIG ENGINE_RAW_BASE
# Fetched to a file rather than piped into a shell: a failed download must fail
# loudly instead of feeding an empty script to sh, which would look like success.
TMP="$(mktemp)"
trap 'rm -f "$TMP"' EXIT
curl -fsSL "$ENGINE_RAW_BASE/install.sh" -o "$TMP"
sh "$TMP"
Executable
+17
View File
@@ -0,0 +1,17 @@
#!/bin/sh
# Remove the Teletype Games store from this machine's RetroArch.
#
# curl -fsSL https://git.teletypegames.org/stores/ttg-retroarch-store/raw/branch/master/uninstall.sh | sh
#
# All the work is done by the engine's uninstaller; this only says which store.
# DRY_RUN=1 to see what would go, KEEP_HOME=1 to keep the state and the log.
set -eu
FORGE="${FORGE:-https://git.teletypegames.org/stores}"
ENGINE_RAW_BASE="${ENGINE_RAW_BASE:-$FORGE/warp-engine-retroarch-store/raw/branch/master}"
STORE_ID="${STORE_ID:-ttg}"
export STORE_ID
TMP="$(mktemp)"
trap 'rm -f "$TMP"' EXIT
curl -fsSL "$ENGINE_RAW_BASE/uninstall.sh" -o "$TMP"
sh "$TMP"