From d0aabfc1524a6d52c64bd3848bc0cd17d2699998 Mon Sep 17 00:00:00 2001 From: Bastian Therres Date: Wed, 7 Nov 2012 09:43:55 +0100 Subject: [PATCH 1/2] Update bin/installDeps.sh -v flag removed from cp (solaris compatibility), added condition for ggrep on solaris --- bin/installDeps.sh | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/bin/installDeps.sh b/bin/installDeps.sh index 9f691e0af..188e3bd1a 100755 --- a/bin/installDeps.sh +++ b/bin/installDeps.sh @@ -8,6 +8,14 @@ if [ -d "../bin" ]; then cd "../" fi +#Is ggrep installed on SunOS (Solaris) +if [ $(uname) = "SunOS" ]; then + hash ggrep > /dev/null 2>&1 || { + echo "Please install ggrep" >&2 + exit 1 + } +fi + #Is wget installed? hash curl > /dev/null 2>&1 || { echo "Please install curl" >&2 @@ -52,7 +60,7 @@ done #Does a $settings exist? if no copy the template if [ ! -f $settings ]; then echo "Copy the settings template to $settings..." - cp -v settings.json.template $settings || exit 1 + cp settings.json.template $settings || exit 1 fi echo "Ensure that all dependencies are up to date..." @@ -71,8 +79,12 @@ echo "Ensure jQuery is downloaded and up to date..." DOWNLOAD_JQUERY="true" NEEDED_VERSION="1.7.1" if [ -f "src/static/js/jquery.js" ]; then - VERSION=$(cat src/static/js/jquery.js | head -n 3 | grep -o "v[0-9]\.[0-9]\(\.[0-9]\)\?"); - + if [ $(uname) = "SunOS"]; then + VERSION=$(cat src/static/js/jquery.js | head -n 3 | ggrep -o "v[0-9]\.[0-9]\(\.[0-9]\)\?"); + else + VERSION=$(cat src/static/js/jquery.js | head -n 3 | grep -o "v[0-9]\.[0-9]\(\.[0-9]\)\?"); + fi + if [ ${VERSION#v} = $NEEDED_VERSION ]; then DOWNLOAD_JQUERY="false" fi @@ -91,11 +103,11 @@ echo "ensure custom css/js files are created..." for f in "index" "pad" "timeslider" do if [ ! -f "src/static/custom/$f.js" ]; then - cp -v "src/static/custom/js.template" "src/static/custom/$f.js" || exit 1 + cp "src/static/custom/js.template" "src/static/custom/$f.js" || exit 1 fi if [ ! -f "src/static/custom/$f.css" ]; then - cp -v "src/static/custom/css.template" "src/static/custom/$f.css" || exit 1 + cp "src/static/custom/css.template" "src/static/custom/$f.css" || exit 1 fi done From 3747b0eeec792e201b8293ac89ef17d2b71cb181 Mon Sep 17 00:00:00 2001 From: Bastian Therres Date: Wed, 7 Nov 2012 10:18:46 +0100 Subject: [PATCH 2/2] Update bin/installDeps.sh comment on ggrep --- bin/installDeps.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/installDeps.sh b/bin/installDeps.sh index 188e3bd1a..15731ae91 100755 --- a/bin/installDeps.sh +++ b/bin/installDeps.sh @@ -8,10 +8,10 @@ if [ -d "../bin" ]; then cd "../" fi -#Is ggrep installed on SunOS (Solaris) +#Is gnu-grep (ggrep) installed on SunOS (Solaris) if [ $(uname) = "SunOS" ]; then hash ggrep > /dev/null 2>&1 || { - echo "Please install ggrep" >&2 + echo "Please install ggrep (pkg install gnu-grep)" >&2 exit 1 } fi