Skip to content

Commit

Permalink
Update makeself-header.sh to better handle relative paths and provide…
Browse files Browse the repository at this point in the history
… a launching script name to a startup_script

Update the ARCHIVE_DIR variable to provide an absolute path even when the makeself script is launched with a relative path. An absolute path is needed when the startup script is ask to place folder and files in a directory relative to the makeself script location.

Add the ARCHIVE_BASE variable. This provides the name of the originating makeself script. This is useful to provide feedback to the user in for example 'usage' messages.
  • Loading branch information
poliphant authored Apr 12, 2024
1 parent 271b54a commit 9fa4d88
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion makeself-header.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@ SIGNATURE="$Signature"
TMPROOT=\${TMPDIR:=/tmp}
USER_PWD="\$PWD"
export USER_PWD
ARCHIVE_DIR=\`dirname "\$0"\`
ARCHIVE_DIR=\$( cd -- "\$(dirname "\$0")" >/dev/null 2>&1 ; echo \$PWD )
export ARCHIVE_DIR
ARCHIVE_BASE=\`basename "\$0"\`
export ARCHIVE_BASE
label="$LABEL"
script="$SCRIPT"
Expand Down

0 comments on commit 9fa4d88

Please sign in to comment.