mirror of
https://github.com/rancher/os.git
synced 2025-09-13 21:51:33 +00:00
./scripts/run: support OS X
This commit is contained in:
@@ -4,6 +4,15 @@
|
|||||||
: ${BUILD:=$(pwd)/build}
|
: ${BUILD:=$(pwd)/build}
|
||||||
: ${DIST:=$(pwd)/dist}
|
: ${DIST:=$(pwd)/dist}
|
||||||
|
|
||||||
|
# PREREQ: brew install coreutils
|
||||||
|
path()
|
||||||
|
{
|
||||||
|
local UNAME=$(uname)
|
||||||
|
if [ "$UNAME" == "Darwin" ]; then greadlink -f "$1"
|
||||||
|
elif [ "$UNAME" == "Linux" ]; then readlink -f "$1";
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
write_base()
|
write_base()
|
||||||
{
|
{
|
||||||
DOCKER_BASE=${DOCKER_BASE:?"DOCKER_BASE not defined"}
|
DOCKER_BASE=${DOCKER_BASE:?"DOCKER_BASE not defined"}
|
||||||
|
@@ -26,7 +26,7 @@ while [ "$#" -gt 0 ]; do
|
|||||||
;;
|
;;
|
||||||
--cloud-config)
|
--cloud-config)
|
||||||
shift 1
|
shift 1
|
||||||
CLOUD_CONFIG=$(readlink -f "$1") || :
|
CLOUD_CONFIG=$(path "$1") || :
|
||||||
if [ ! -f ${CLOUD_CONFIG} ]; then
|
if [ ! -f ${CLOUD_CONFIG} ]; then
|
||||||
echo No such file: "'"${CLOUD_CONFIG}"'" 1>&2
|
echo No such file: "'"${CLOUD_CONFIG}"'" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
|
Reference in New Issue
Block a user