Resolve $PREFIX to an absolute path at the start of shell scripts

This fixes building/installing into a relative path.
This commit is contained in:
Martin Storsjö committed 2018-11-23 13:51:05 +02:00
1 parent ecdbfaacc3
commit 53db1c3a4c
7 files changed
+20

No files matched your search

+3
View File
@@ -22,6 +22,9 @@ if [ -z "$PREFIX" ]; then
exit 1
fi
mkdir -p "$PREFIX"
PREFIX="$(cd "$PREFIX" && pwd)"
: ${CORES:=$(nproc 2>/dev/null)}
: ${CORES:=$(sysctl -n hw.ncpu 2>/dev/null)}
: ${CORES:=4}