From ba8ee11132606c489c2df014cb106b9c43b7848c Mon Sep 17 00:00:00 2001 From: Alex Schultz Date: Thu, 15 Oct 2015 09:59:57 -0500 Subject: [PATCH] Fix scripts to be OSX compatible readlink on OSX does not support the -f option. As an alternative, we can use pwd -P to resolve the path. Change-Id: Ibaeadea9685f7a9603198ed1a509176cf70f9b21 Closes-Bug: #1506504 --- install_modules.sh | 2 +- install_modules_unit.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/install_modules.sh b/install_modules.sh index ecc0ac98e..7af27ad07 100755 --- a/install_modules.sh +++ b/install_modules.sh @@ -6,7 +6,7 @@ if [ ! -z ${GEM_HOME} ]; then GEM_BIN_DIR=${GEM_HOME}/bin/ fi -export SCRIPT_DIR=$(readlink -f "$(dirname $0)") +export SCRIPT_DIR=$(cd `dirname $0` && pwd -P) export PUPPETFILE_DIR=${PUPPETFILE_DIR:-/etc/puppet/modules} source $SCRIPT_DIR/functions diff --git a/install_modules_unit.sh b/install_modules_unit.sh index 3a2c06e6e..79b14b7e2 100755 --- a/install_modules_unit.sh +++ b/install_modules_unit.sh @@ -10,7 +10,7 @@ if [ ! -z ${GEM_HOME} ]; then GEM_BIN_DIR=${GEM_HOME}/bin/ fi -export SCRIPT_DIR=$(readlink -f "$(dirname $0)") +export SCRIPT_DIR=$(cd `dirname $0` && pwd -P) export PUPPETFILE_DIR=${PUPPETFILE_DIR:-/etc/puppet/modules} source $SCRIPT_DIR/functions