summaryrefslogtreecommitdiff
path: root/scripts/linux
diff options
context:
space:
mode:
authormattman107 <65982675+mattman107@users.noreply.github.com>2023-12-27 12:51:36 -0500
committerGitHub <noreply@github.com>2023-12-27 12:51:36 -0500
commit9b74dc28924cf5c04242c4475026f5c913ccb246 (patch)
treeb90954bf020983236143c60c642def14fd1bf11a /scripts/linux
parenta6bb6cf0a3aad06f926ba160016ac06aedd94600 (diff)
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 <Archez@users.noreply.github.com> --------- Co-authored-by: Adam Bird <Archez@users.noreply.github.com>
Diffstat (limited to 'scripts/linux')
-rw-r--r--scripts/linux/appimage/soh.sh.in9
1 files 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 }')