Add purge and an uninstaller, and move to the stores org

`purge` removes every title this store installed, then the playlists, the
thumbnail folders and the store's own directories — what a shell script cannot
do, because only state.json knows which files were ours. uninstall.sh runs it
before deleting the launcher and the store home, and stops if the engine cannot
finish, so you are never left with the files but not the engine that knew about
them.

What survives on purpose: content you put in the store's folder (directories go
only when empty), and a playlist that still holds an entry of yours — only items
pointing inside the store's content folder are dropped, and a playlist that ends
up empty is deleted while one that does not is rewritten without us.

A playlist backup is no longer made while purging. It was being created on the
uninstall's first touch of a playlist we had written ourselves, which meant the
run reported a backup it had just made — and described it as possibly holding
entries that were never ours, which was the opposite of true.

install.sh and uninstall.sh are POSIX sh now, checked with dash, so `curl … | sh`
works where /bin/sh is not bash. The repository moved from the tools org to
stores; the old raw URLs still redirect, but every reference is updated.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-08-18 08:32:29 +02:00
co-authored by Claude Opus 5
parent e6a55f56a2
commit 51493c13f0
4 changed files with 242 additions and 18 deletions
+4 -4
View File
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh
# Install a WarpEngine store into a RetroArch installation.
#
# This installer belongs to the engine, so it takes the store as a parameter:
@@ -8,13 +8,13 @@
#
# STORE_CONFIG=./config.json ./install.sh
# STORE_CONFIG=https://git.example.org/tools/my-store/raw/branch/master/config.json \
# bash <(curl -fsSL https://git.teletypegames.org/tools/warp-engine-retroarch-store/raw/branch/master/install.sh)
# curl -fsSL https://git.teletypegames.org/stores/warp-engine-retroarch-store/raw/branch/master/install.sh | sh
#
set -euo pipefail
set -eu
STORE_ROOT="${STORE_ROOT:-${XDG_DATA_HOME:-$HOME/.local/share}/warp-engine-store}"
BIN_DIR="${BIN_DIR:-$HOME/.local/bin}"
ENGINE_RAW_BASE="${ENGINE_RAW_BASE:-https://git.teletypegames.org/tools/warp-engine-retroarch-store/raw/branch/master}"
ENGINE_RAW_BASE="${ENGINE_RAW_BASE:-https://git.teletypegames.org/stores/warp-engine-retroarch-store/raw/branch/master}"
# The shared core lives in its own repository, because both store engines use it.
WARPSTORE_RAW_BASE="${WARPSTORE_RAW_BASE:-https://git.teletypegames.org/engines/warpstore/raw/branch/master}"
STORE_CONFIG="${STORE_CONFIG:-}"