aboutsummaryrefslogtreecommitdiff
path: root/appimage/build_appimage.sh
diff options
context:
space:
mode:
Diffstat (limited to 'appimage/build_appimage.sh')
-rwxr-xr-xappimage/build_appimage.sh17
1 files changed, 11 insertions, 6 deletions
diff --git a/appimage/build_appimage.sh b/appimage/build_appimage.sh
index b74e98c..1317bab 100755
--- a/appimage/build_appimage.sh
+++ b/appimage/build_appimage.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
"""
@@ -14,8 +14,8 @@ BINARY_TARBALL=$1
APPIMAGE_FILE=$2
_SCRIPT_FOLDER=$(realpath $(dirname $0));
_BINARY_TARBALL_EXTRACTED_FOLDER=$_SCRIPT_FOLDER/librewolf;
-_BUILD_APPIMAGE_FILE=$_SCRIPT_FOLDER/LibreWolf*.AppImage;
-_APPIMAGETOOL_DOWNLOAD_URL=https://github.com/AppImage/AppImageKit/releases/latest/download/appimagetool-x86_64.AppImage;
+_BUILD_APPIMAGE_FILE=$_SCRIPT_FOLDER/LibreWolf.AppImage;
+_APPIMAGETOOL_DOWNLOAD_URL=https://github.com/AppImage/AppImageKit/releases/latest/download/appimagetool-${CARCH}.AppImage;
_APPIMAGETOOL_EXTRACTED_FOLDER=$_SCRIPT_FOLDER/squashfs-root;
_APPIMAGETOOL_FILE=$_SCRIPT_FOLDER/appimagetool;
_APPIMAGE_CONTENT_FOLDER=$_SCRIPT_FOLDER/content
@@ -23,6 +23,10 @@ _APPIMAGE_CONTENT_FOLDER=$_SCRIPT_FOLDER/content
# Installs needed dependencies
apt-get update && apt-get -y install file;
+if [[ $CARCH == 'aarch64' ]]; then
+ apt install -y zlib1g-dev
+fi
+
# Extracts the binary tarball
printf "\nExtracting librewolf binary tarball\n";
mkdir $_BINARY_TARBALL_EXTRACTED_FOLDER;
@@ -34,14 +38,15 @@ cp -vrT $_APPIMAGE_CONTENT_FOLDER $_BINARY_TARBALL_EXTRACTED_FOLDER;
# Downloads appimage tool
printf "\nDownloading AppImage Tool\n";
-apt -qq update && apt -qqy install wget;
+apt -qq update && apt -qqy install wget;
wget $_APPIMAGETOOL_DOWNLOAD_URL -O $_APPIMAGETOOL_FILE;
chmod +x $_APPIMAGETOOL_FILE;
# Generate AppImage
printf "\nGenerating AppImage\n";
-ARCH=x86_64 $_APPIMAGETOOL_FILE --appimage-extract-and-run $_BINARY_TARBALL_EXTRACTED_FOLDER;
-chmod +x $_BUILD_APPIMAGE_FILE;
+ARCH=${CARCH} $_APPIMAGETOOL_FILE --appimage-extract-and-run\
+ $_BINARY_TARBALL_EXTRACTED_FOLDER $_BUILD_APPIMAGE_FILE;
+chmod +x $_BUILD_APPIMAGE_FILE;
# Move AppImage to specified location
printf "\nMoving AppImage to specified location\n";
bgstack15