Skip to content
This repository has been archived by the owner on Jul 22, 2021. It is now read-only.

Commit

Permalink
Merge pull request #3 from punkstar/master
Browse files Browse the repository at this point in the history
Work around missing realpath in OSX
  • Loading branch information
IvanChepurnyi committed Sep 19, 2013
2 parents 7119905 + 82a7a96 commit be15b2c
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion bin/mage-ci
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,24 @@
# @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
# @author Ivan Chepurnyi <ivan.chepurnyi@ecomdev.org>

OS=`uname -s`

if [ "$OS" = "Darwin" ]
then
# @see http://stackoverflow.com/a/18443300/283844
realpath() {
OURPWD=$PWD
cd "$(dirname "$1")"
LINK=$(readlink "$(basename "$1")")
while [ "$LINK" ]; do
cd "$(dirname "$LINK")"
LINK=$(readlink "$(basename "$1")")
done
REALPATH="$PWD/$(basename "$1")"
cd "$OURPWD"
echo "$REALPATH"
}
fi

script_bin=$(realpath $0 || readlink -f $0)
script=$(basename $script_bin)
Expand Down Expand Up @@ -497,7 +515,7 @@ install_module () {
check_error_exit
fi
else
$modman $magento_module update
$modman update $magento_module
echo "${MAGECIF[2]}Updating module${MAGECIF[0]}"
fi

Expand Down

0 comments on commit be15b2c

Please sign in to comment.