_initappimage in site.py

This commit is contained in:
Valentin Niess
2022-06-11 16:22:07 +02:00
parent d947ae8afb
commit cd5df332f1
6 changed files with 69 additions and 56 deletions

View File

@@ -1,9 +1,16 @@
{{ shebang }}
# Export APPRUN if running from an extracted image
self="$(readlink -f -- $0)"
here="${self%/*}"
APPDIR="${APPDIR:-${here}}"
# If running from an extracted image, then export ARGV0 and APPDIR
if [ -z "${APPIMAGE}" ]; then
export ARGV0=$0
self="$(readlink -f -- $0)"
here="${self%/*}"
export APPDIR="${APPDIR:-${here}}"
fi
# Resolve the calling command (preserving symbolic links).
export APPIMAGE_COMMAND="$(command -v -- $ARGV0)"
{{ tcltk-env }}
{{ cert-file }}