2021-12-01 21:35:47 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# Set the TAG environment variable to move to a versioned name while extracting
|
|
|
|
|
2021-12-03 09:53:15 +01:00
|
|
|
# Make sure we're in the same directory as this script
|
2021-12-01 21:35:47 +01:00
|
|
|
pushd $(dirname "$(realpath "$0")")
|
|
|
|
|
2021-12-03 09:53:15 +01:00
|
|
|
SUFFIX=""
|
|
|
|
[ -n "$TAG" ] && SUFFIX=":$TAG"
|
|
|
|
|
2021-12-01 21:35:47 +01:00
|
|
|
# Remove old containers
|
|
|
|
docker rm imhex 2>&1 > /dev/null
|
|
|
|
|
2021-12-03 09:53:15 +01:00
|
|
|
docker run -d --name imhex imhex-appimage-build${SUFFIX} sleep 30 &
|
|
|
|
sleep 15
|
2021-12-01 21:35:47 +01:00
|
|
|
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
|
2021-12-03 09:53:15 +01:00
|
|
|
echo -e "\nThe created AppImage can be found here:\n $(pwd)/ImHex-${TAG}-x86_64.AppImage\n\n"
|
|
|
|
else
|
|
|
|
echo -e "\nThe created AppImage can be found here:\n $(pwd)/ImHex-x86_64.AppImage\n\n"
|
2021-12-01 21:35:47 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
popd
|