From 9b74dc28924cf5c04242c4475026f5c913ccb246 Mon Sep 17 00:00:00 2001 From: mattman107 <65982675+mattman107@users.noreply.github.com> Date: Wed, 27 Dec 2023 12:51:36 -0500 Subject: [PATCH] Update linux/appimage script to use symlinked rom files (#3483) * Update soh.sh.in Added support for symlinked rom files in linux/appimage script. * Update scripts/linux/appimage/soh.sh.in Updated to be less confusing as per Archez Co-authored-by: Adam Bird --------- Co-authored-by: Adam Bird --- scripts/linux/appimage/soh.sh.in | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/linux/appimage/soh.sh.in b/scripts/linux/appimage/soh.sh.in index bfc3cfec6..a9d6dbf8c 100644 --- a/scripts/linux/appimage/soh.sh.in +++ b/scripts/linux/appimage/soh.sh.in @@ -21,12 +21,17 @@ fi while [[ (! -e "$SHIP_HOME"/oot.otr) || (! -e "$SHIP_HOME"/oot-mq.otr) ]]; do for romfile in "$SHIP_HOME"/*.*64 do - if [[ -e $romfile ]]; then + if [[ -e "$romfile" ]] || [[ -L "$romfile" ]]; then export ASSETDIR="$(mktemp -d /tmp/assets-XXXXX)" ln -s "$HERE"/usr/bin/{assets,soh.elf,ZAPD} "$ASSETDIR" export OLDPWD="$PWD" mkdir -p "$ASSETDIR"/tmp - ln -s "$romfile" "$ASSETDIR"/tmp/rom.z64 + if [[ -e "$romfile" ]]; then + ln -s "$romfile" "$ASSETDIR"/tmp/rom.z64 + else + ORIG_ROM_PATH=$(readlink "$romfile") + ln -s "$ORIG_ROM_PATH" "$ASSETDIR"/tmp/rom.z64 + fi cd "$ASSETDIR" ROMHASH=$(sha1sum -b "$ASSETDIR"/tmp/rom.z64 | awk '{ print $1 }')