began making the client AppImage-aware
[citadel.git] / appimage / build_appimage.sh
index 665d8dd381fa40e68a83c328e4fcafac79df43cf..db3f6b30b3e2de61370b7d9e052ae75187a82127 100755 (executable)
@@ -1,10 +1,15 @@
 #!/bin/bash
 
+# Work from the directory this script is in
+APPIMAGE_BUILD_DIR=$(dirname $(readlink -f $0))
+cd $APPIMAGE_BUILD_DIR || exit 28
+echo APPIMAGE_BUILD_DIR is `pwd`
+
+# Remove old versions
 rm -vf citadel-*appimage
 
 export CITADEL_BUILD_DIR=/tmp/citadel-build-$$
 export WEBCIT_BUILD_DIR=/tmp/webcit-build-$$
-rm -fr $CITADEL_BUILD_DIR $WEBCIT_BUILD_DIR
 
 # libcitadel has to be built in a "real" library directory
 pushd ../libcitadel || exit 1
@@ -96,7 +101,9 @@ basefilename=citadel-`cat ../release_version.txt`
 if [ $CPU == x86_64 ] ; then
        export ARCH=x86_64
 elif [ $CPU == armv7l ] ; then
-       export ARCH=ARM
+       export ARCH=armhf
+elif [ $CPU == aarch64 ] ; then
+       export ARCH=aarch64
 fi
 echo ARCH: $ARCH
 echo CPU: $CPU