Don't use parameter expansion for paths
It fails when the script is started with `bash package-all.sh`.
This commit is contained in:
committed by
Matthias Mailänder
parent
19ecddcd86
commit
b1ffe0edd5
@@ -4,15 +4,16 @@
|
|||||||
set -o errexit -o pipefail || exit $?
|
set -o errexit -o pipefail || exit $?
|
||||||
|
|
||||||
if [ $# -ne "2" ]; then
|
if [ $# -ne "2" ]; then
|
||||||
echo "Usage: ${0##*/} version outputdir."
|
echo "Usage: $(basename "$0") version outputdir."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export GIT_TAG="$1"
|
export GIT_TAG="$1"
|
||||||
export BUILD_OUTPUT_DIR="$2"
|
export BUILD_OUTPUT_DIR="$2"
|
||||||
|
|
||||||
# Set the working dir to the location of this script using bash parameter expansion
|
# Set the working dir to the location of this script
|
||||||
cd "${0%/*}"
|
HERE=$(dirname "$0")
|
||||||
|
cd "${HERE}"
|
||||||
|
|
||||||
#build packages using a subshell so directory changes do not persist beyond the function
|
#build packages using a subshell so directory changes do not persist beyond the function
|
||||||
function build_package() (
|
function build_package() (
|
||||||
|
|||||||
Reference in New Issue
Block a user