mirror of
https://github.com/chocolate-doom/chocpkg.git
synced 2025-01-22 00:11:10 +00:00
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:
parent
ea6d80c4bf
commit
4876563b75
1 changed files with 5 additions and 1 deletions
|
@ -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")
|
||||
|
||||
|
|
Loading…
Reference in a new issue