Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow overriding of appimagetool parameters #285

Merged
merged 1 commit into from
Nov 26, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,10 @@ generate_appimage()
}

# Generate AppImage type 2
# Additional parameters given to this routine will be passed on to appimagetool
#
# If the environment variable NO_GLIBC_VERSION is set, the required glibc version
# will not be added to the AppImage filename
generate_type2_appimage()
{
# Get the ID of the last successful build on Travis CI
Expand Down Expand Up @@ -208,6 +212,12 @@ generate_type2_appimage()
trap _appimagetool_cleanup EXIT
fi

if [ -z ${NO_GLIBC_VERSION+true} ]; then
VERSION_EXPANDED=$VERSION.glibc$GLIBC_NEEDED
else
VERSION_EXPANDED=$VERSION
fi

set +x
if ( [ ! -z "$KEY" ] ) && ( ! -z "$TRAVIS" ) ; then
wget https://github.com/AppImage/AppImageKit/files/584665/data.zip -O data.tar.gz.gpg
Expand All @@ -216,10 +226,10 @@ generate_type2_appimage()
sudo chown -R $USER .gnu*
mv $HOME/.gnu* $HOME/.gnu_old ; mv .gnu* $HOME/
GLIBC_NEEDED=${GLIBC_NEEDED:=$(glibc_needed)}
VERSION=$VERSION.glibc$GLIBC_NEEDED "$appimagetool" -n -s --bintray-user $BINTRAY_USER --bintray-repo $BINTRAY_REPO -v ./$APP.AppDir/
VERSION=$VERSION_EXPANDED "$appimagetool" $@ -n -s --bintray-user $BINTRAY_USER --bintray-repo $BINTRAY_REPO -v ./$APP.AppDir/
else
GLIBC_NEEDED=${GLIBC_NEEDED:=$(glibc_needed)}
VERSION=$VERSION.glibc$GLIBC_NEEDED "$appimagetool" -n --bintray-user $BINTRAY_USER --bintray-repo $BINTRAY_REPO -v ./$APP.AppDir/
VERSION=$VERSION_EXPANDED "$appimagetool" $@ -n --bintray-user $BINTRAY_USER --bintray-repo $BINTRAY_REPO -v ./$APP.AppDir/
fi
set -x
mkdir -p ../out/ || true
Expand Down