This repository has been archived on 2024-12-12. You can view files and clone it, but cannot push or open issues or pull requests.
PyBitmessage-2024-12-12/buildscripts/appimage.sh

37 lines
1.0 KiB
Bash
Raw Normal View History

#!/bin/bash
2021-06-04 21:43:13 +02:00
# Cleanup
rm -rf PyBitmessage
export VERSION=$(python setup.py --version)
[ -f "pkg2appimage" ] || wget -O "pkg2appimage" https://github.com/AppImage/pkg2appimage/releases/download/continuous/pkg2appimage-1807-x86_64.AppImage
chmod a+x pkg2appimage
echo "Building AppImage"
2021-12-03 17:41:55 +01:00
if grep docker /proc/1/cgroup; then
export APPIMAGE_EXTRACT_AND_RUN=1
mkdir PyBitmessage
wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage -O PyBitmessage/appimagetool \
&& chmod +x PyBitmessage/appimagetool
fi
2021-06-04 21:43:13 +02:00
2021-12-03 17:41:55 +01:00
./pkg2appimage packages/AppImage/PyBitmessage.yml
2021-06-04 21:43:13 +02:00
./pkg2appimage --appimage-extract
. ./squashfs-root/usr/share/pkg2appimage/functions.sh
GLIBC=$(glibc_needed)
VERSION_EXPANDED=${VERSION}.glibc${GLIBC}-${SYSTEM_ARCH}
if [ -f "out/PyBitmessage-${VERSION_EXPANDED}.AppImage" ]; then
2021-06-04 21:43:13 +02:00
echo "Build Successful";
echo "Run out/PyBitmessage-${VERSION_EXPANDED}.AppImage";
out/PyBitmessage-${VERSION_EXPANDED}.AppImage -t
2021-06-04 21:43:13 +02:00
else
echo "Build Failed";
exit 1
2021-06-04 21:43:13 +02:00
fi