pack script introduced and several bugs fix.

This commit is contained in:
CongTianKong
2023-07-30 18:47:41 +08:00
parent 68f230d82e
commit 6b519e0bc3
4 changed files with 228 additions and 0 deletions

38
scripts/ablrun-appimage Executable file
View File

@@ -0,0 +1,38 @@
#!/bin/bash
if [ "$*" = "" ]
then
echo "usage: $0 [appimage-file [arguments ...]]"
echo " This is helper script to run appimages for additional-base-lib."
echo
echo " You have to ensure input file IS an appimage, for this script"
echo " does not check. If you input other files, It will become"
echo " unpredictable."
exit
fi
ABLIMAGE_PARAMETERS=("$@")
coproc "$1" --appimage-mount
ABLIMAGE_PID=$!
cleanup() {
kill $ABLIMAGE_PID
exit
}
trap cleanup SIGHUP
trap cleanup SIGINT
trap cleanup SIGTERM
if [ ! -e /proc/$! ]
then
echo "Child process failed."
exit 1
fi
read -u ${COPROC[0]} ABLIMAGE_DIR
ablrun-normal "$ABLIMAGE_DIR/AppRun" ${ABLIMAGE_PARAMETERS[@]:1}
cleanup