diff options
author | BeatLink <beatlink@protonmail.com> | 2019-08-16 20:00:38 -0500 |
---|---|---|
committer | BeatLink <beatlink@protonmail.com> | 2019-08-16 20:00:38 -0500 |
commit | d16a5b29e81bb6e0e58af2a97484defccacf355c (patch) | |
tree | 4ef06da3e1d9548a99fc4ce8adf4587d7bd14621 /linux/appimage/build_appimage.sh | |
parent | move toggle settings folder to linux script (diff) | |
download | librewolf-linux-d16a5b29e81bb6e0e58af2a97484defccacf355c.tar.gz librewolf-linux-d16a5b29e81bb6e0e58af2a97484defccacf355c.tar.bz2 librewolf-linux-d16a5b29e81bb6e0e58af2a97484defccacf355c.zip |
Move branding and settings to seperate repos and move browser to top level
Diffstat (limited to 'linux/appimage/build_appimage.sh')
-rwxr-xr-x | linux/appimage/build_appimage.sh | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/linux/appimage/build_appimage.sh b/linux/appimage/build_appimage.sh new file mode 100755 index 0000000..c3e53d0 --- /dev/null +++ b/linux/appimage/build_appimage.sh @@ -0,0 +1,44 @@ +#!/bin/sh +printf "\n\n------------------------------------ APPIMAGE BUILD -----------------------------------------\n"; + +# Aborts the script upon any faliure +set -e; + +# Sets up script variables +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; +_APPIMAGETOOL_EXTRACTED_FOLDER=$_SCRIPT_FOLDER/squashfs-root; +_APPIMAGETOOL_FILE=$_SCRIPT_FOLDER/appimagetool; +_APPIMAGE_CONTENT_FOLDER=$_SCRIPT_FOLDER/content + +# Extracts the binary tarball +printf "\nExtracting librewolf binary tarball\n"; +mkdir $_BINARY_TARBALL_EXTRACTED_FOLDER; +tar -xvf $BINARY_TARBALL -C $_BINARY_TARBALL_EXTRACTED_FOLDER; + +# Copy appimage resources to main tarball +printf "Copying AppImage resources to binary tarball folder\n"; +cp -vrT $_APPIMAGE_CONTENT_FOLDER $_BINARY_TARBALL_EXTRACTED_FOLDER; + +# Downloads appimage tool +printf "\nDownloading AppImage Tool\n"; +apt -qq update && apt -qqy install wget; +wget $_APPIMAGETOOL_DOWNLOAD_URL -O $_APPIMAGETOOL_FILE; +chmod +x $_APPIMAGETOOL_FILE; +$_APPIMAGETOOL_FILE --appimage-mount $_APPIMAGETOOL_EXTRACTED_FOLDER; +rm -f $_APPIMAGETOOL_FILE; + +# Generate AppImage +printf "\nGenerating AppImage\n"; +ARCH=x86_64 $_APPIMAGETOOL_EXTRACTED_FOLDER/AppRun $_BINARY_TARBALL_EXTRACTED_FOLDER; +rm -rf $_BINARY_TARBALL_EXTRACTED_FOLDER; +rm -rf $_APPIMAGETOOL_EXTRACTED_FOLDER; +chmod +x $_BUILD_APPIMAGE_FILE; + +# Move AppImage to specified location +printf "\nMoving AppImage to specified location\n"; +mv $_BUILD_APPIMAGE_FILE $APPIMAGE_FILE; |