Skip to content

Commit

Permalink
Set APPDIR in AppRun if not set by AppImage
Browse files Browse the repository at this point in the history
Hopefully this makes AppRun easier to user when the AppImage is extracted.
  • Loading branch information
markwkm committed Mar 12, 2024
1 parent 7564d9c commit c3ad7a4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 4 additions & 0 deletions appimage/AppRun.in
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ $(find "${APPDIR}/usr/bin" -maxdepth 1 -type f -name "dbt2-*" -printf "%f\n" | s
EOF
}

if [ "${APPDIR}" = "" ]; then
APPDIR="$(cd -- "$(dirname -- "${0}")" && pwd)"
fi

if [ $# -eq 0 ]; then
usage
exit 1
Expand Down
5 changes: 1 addition & 4 deletions doc/user-guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,9 @@ it hasn't already been done. Examples in the documentation will assume it has
been renamed to `dbt2`.

If FUSE is not available, the AppImage is self-extracting and provides a script
`AppRun` that can be executed as if running the AppImage itself, when the
**APPDIR** environment variable is set to the absolute path of the extracted
`squashfs-root` directory.::
`AppRun` that can be executed as if running the AppImage itself::

dbt2-*.AppImage --extract-appimage
export APPDIR="$(pwd)/squashfs-root"
squashfs-root/AppRun

Alternatively, one could also set `PATH` and `LD_LIBRARTY_PATH` manually to
Expand Down

0 comments on commit c3ad7a4

Please sign in to comment.