Skip to content

Commit

Permalink
Add environment variable USER_PWD
Browse files Browse the repository at this point in the history
If the startup-script need the current working directory for the
user extracting the archive OLDPWD will work with most shells.
However, this is not always guaranteed to work.

This patch records the content of PWD at the time the
self-extracting script is run into USER_PWD.  The startup-script
can then more reliably use this environment variable.

This approach have been tested on different versions of HPUX, AIX,
Solaris, QNX Neutrino, Linux, and OS-X.
  • Loading branch information
sj-raima committed Dec 10, 2013
1 parent 1ab00a5 commit 10fa357
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions makeself-header.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ umask 077
CRCsum="$CRCsum"
MD5="$MD5sum"
TMPROOT=\${TMPDIR:=/tmp}
USER_PWD="\$PWD"; export USER_PWD
label="$LABEL"
script="$SCRIPT"
Expand Down

0 comments on commit 10fa357

Please sign in to comment.