1
0
mirror of synced 2024-11-15 03:27:40 +01:00
ImHex/dist/AppImage/extract.sh
wardwouts be1c5f5d1d
build: Added AppImage builder (#355)
* Docker files to create an AppImage

* Using ENTRYPOINT is a bit nicer here

* typo

* put with other dist files
2021-12-01 21:35:47 +01:00

27 lines
857 B
Bash
Executable File

#!/bin/bash
# Set the TAG environment variable to move to a versioned name while extracting
# Make sure we're in the same direcotry as this script
pushd $(dirname "$(realpath "$0")")
# Remove old containers
docker rm imhex 2>&1 > /dev/null
# AppImage uses FUSE, which makes --device /dev/fuse --cap-add SYS_ADMIN necessary here
# on Debian --security-opt apparmor:unconfined is also needed
if [ -z "$TAG" ]; then
docker run -d --device /dev/fuse --cap-add SYS_ADMIN --security-opt apparmor:unconfined --name imhex imhex-appimage-build
else
docker run -d --device /dev/fuse --cap-add SYS_ADMIN --security-opt apparmor:unconfined --name imhex imhex-appimage-build-$TAG
fi
sleep 10
docker cp imhex:/ImHex-x86_64.AppImage .
# Move to tagged name if $TAG set
if [ -n "$TAG" ]; then
mv ImHex-x86_64.AppImage ImHex-${TAG}-x86_64.AppImage
fi
popd