From b3b025995517832c27399ffab2a613f7b6f49273 Mon Sep 17 00:00:00 2001 From: Guillaume Lesniak Date: Mon, 18 Apr 2016 14:31:41 +0200 Subject: [PATCH] link_modules_resources: Fix realpath on OSX --- scripts/link_modules_resources.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/link_modules_resources.sh b/scripts/link_modules_resources.sh index 019d0ee..0b9b0fb 100755 --- a/scripts/link_modules_resources.sh +++ b/scripts/link_modules_resources.sh @@ -1,5 +1,13 @@ #!/bin/bash +if [[ "$OSTYPE" == "darwin"* ]]; then + # Mac OS X doesn't have realpath + realpath() { + [[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}" + } +fi + + if [ ! -d public/js ]; then mkdir public/js fi