Fix setting RELENGDIR when release.sh is called from an external

script.

Sponsored by:	Rubicon Communications, LLC (netgate.com)
This commit is contained in:
gjb 2020-09-14 15:58:10 +00:00
parent 91c72b2602
commit 1b83fc5616

View File

@ -57,7 +57,9 @@ usage() {
env_setup() {
# The directory within which the release will be built.
CHROOTDIR="/scratch"
RELENGDIR="$(dirname $(realpath ${0}))"
if [ -z "${RELENGDIR}" ]; then
export RELENGDIR="$(dirname $(realpath ${0}))"
fi
# The default version control system command to obtain the sources.
for _dir in /usr/bin /usr/local/bin; do