Skip to content

Commit a75f53e

Browse files
Merge pull request #289 from SergeBakharev/replace_appimagekit_for_linuxdeploy
Update linuxdeploy installation script to dynamically detect CPU arch
2 parents 8ca7574 + 3cafad7 commit a75f53e

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

scripts/install_linux_prereqs.sh

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,15 @@ sudo apt install -y \
2828

2929

3030
print_status "Installing linuxdeploy (AppImage)"
31-
LINUXDEPLOY_URL="https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage"
31+
ARCH=$(uname -m)
32+
LINUXDEPLOY_URL="https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-${ARCH}.AppImage"
3233
LINUXDEPLOY_BIN="linuxdeploy"
33-
TMP_LINUXDEPLOY="/tmp/linuxdeploy-x86_64.AppImage"
34-
curl -L "$LINUXDEPLOY_URL" -o "$TMP_LINUXDEPLOY"
34+
echo "Detected architecture: $ARCH. Attempting to download linuxdeploy-${ARCH}.AppImage."
35+
TMP_LINUXDEPLOY="/tmp/${LINUXDEPLOY_BIN}.AppImage"
36+
if ! curl -L "$LINUXDEPLOY_URL" -o "$TMP_LINUXDEPLOY"; then
37+
echo "Warning: Failed to download $LINUXDEPLOY_URL. This architecture may not be supported by linuxdeploy."
38+
exit 1
39+
fi
3540
chmod +x "$TMP_LINUXDEPLOY"
3641
if [ "$(id -u)" -eq 0 ]; then
3742
mv "$TMP_LINUXDEPLOY" "/usr/local/bin/$LINUXDEPLOY_BIN"

0 commit comments

Comments
 (0)