Don't use realpath, as it is non-standard.

This appears to be a GNU-specific utility and doesn't exist on OS X.
This commit is contained in:
Simon Howard 2016-02-23 22:00:20 -05:00
parent ea6d80c4bf
commit 4876563b75

View file

@ -6,7 +6,11 @@ set -eu
# path where the script is located.
set_chocpkg_root() {
# Assume that the package root is one directory up from the script.
local script_path=$(realpath "$0")
if [[ $0 = /* ]]; then
local script_path="$0"
else
local script_path="$PWD/${0#./}"
fi
local script_dir=$(dirname "$script_path")
CHOCPKG_ROOT=$(dirname "$script_dir")