Skip to content

Commit

Permalink
Attempt to parameterize the Linux AppImage patch script
Browse files Browse the repository at this point in the history
  • Loading branch information
savetheclocktower committed Nov 13, 2024
1 parent 52c3c6a commit 109fe8c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ jobs:

- name: Fix AppImage target - Linux
if: ${{ runner.os == 'Linux' }}
run: ./script/fix-linux-appimage.sh x86_64
run: ./script/fix-linux-appimage.sh x86_64 pulsar-next

- name: Cache Pulsar Binaries - Linux
if: ${{ runner.os == 'Linux' }}
Expand Down
8 changes: 7 additions & 1 deletion script/fix-linux-appimage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ else
APPIMAGETOOL_ARCH="arm_aarch64"
fi

SCRIPT_NAME="${2:pulsar}"

echo "Architecture is: ${APPIMAGE_ARCH}"

cd binaries
Expand Down Expand Up @@ -85,7 +87,11 @@ rm -f AppRun
# Next we'll use `awk` to replace the reference to BIN in `AppRun` so that it
# points to `pulsar.sh` rather than the `pulsar` executable.
echo "Making new AppRun…"
awk '{sub(/BIN=(.*?)/,"BIN=\"$APPDIR/resources/pulsar.sh\""); print}' AppRun.old > AppRun
if [ $SCRIPT_NAME == "pulsar-next" ]; then
awk '{sub(/BIN=(.*?)/,"BIN=\"$APPDIR/resources/pulsar-next.sh\""); print}' AppRun.old > AppRun
else
awk '{sub(/BIN=(.*?)/,"BIN=\"$APPDIR/resources/pulsar.sh\""); print}' AppRun.old > AppRun
fi
chmod a+x AppRun

# For sanity's sake, show the new line so we know that this was done properly
Expand Down

0 comments on commit 109fe8c

Please sign in to comment.