You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by jo...@apache.org on 2014/12/10 13:54:56 UTC

incubator-nifi git commit: NIFI-154 contributed via JIRA by Jake Visser jake at nightrise dot com dot au

Repository: incubator-nifi
Updated Branches:
  refs/heads/develop 51d177b24 -> 2735c6c25


NIFI-154 contributed via JIRA by Jake Visser jake at nightrise dot com dot au


Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/2735c6c2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/2735c6c2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/2735c6c2

Branch: refs/heads/develop
Commit: 2735c6c253483fb72f5ec946264f321392950b72
Parents: 51d177b
Author: joewitt <jo...@apache.org>
Authored: Wed Dec 10 07:38:12 2014 -0500
Committer: joewitt <jo...@apache.org>
Committed: Wed Dec 10 07:38:12 2014 -0500

----------------------------------------------------------------------
 .../resources/src/main/resources/bin/nifi.sh        | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/2735c6c2/nar-bundles/framework-bundle/framework/resources/src/main/resources/bin/nifi.sh
----------------------------------------------------------------------
diff --git a/nar-bundles/framework-bundle/framework/resources/src/main/resources/bin/nifi.sh b/nar-bundles/framework-bundle/framework/resources/src/main/resources/bin/nifi.sh
index d069fc9..6fedfb7 100644
--- a/nar-bundles/framework-bundle/framework/resources/src/main/resources/bin/nifi.sh
+++ b/nar-bundles/framework-bundle/framework/resources/src/main/resources/bin/nifi.sh
@@ -50,6 +50,11 @@ if [ "x$JAVA_MAX_PERMSIZE" = "x" ]; then
     export JAVA_MAX_PERMSIZE
 fi
 
+#
+#Readlink is not available on all systems. Change variable to appropriate alternative as part of OS detection
+#
+
+READLINK="readlink"
 
 warn() {
     echo "${PROGNAME}: $*"
@@ -65,6 +70,7 @@ detectOS() {
     cygwin=false;
     aix=false;
     os400=false;
+    darwin=false;
     case "`uname`" in
         CYGWIN*)
             cygwin=true
@@ -75,12 +81,18 @@ detectOS() {
         OS400*)
             os400=true
             ;;
+        Darwin)
+        	darwin=true
+        	;;
     esac
     # For AIX, set an environment variable
     if $aix; then
          export LDR_CNTRL=MAXDATA=0xB0000000@DSA
          echo $LDR_CNTRL
     fi
+    if $darwin; then
+    	READLINK="greadlink"
+    fi
 }
 
 unlimitFD() {
@@ -118,8 +130,8 @@ locateHome() {
 
     # In POSIX shells, CDPATH may cause cd to write to stdout
     (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-    NIFI_HOME=$(dirname $(readlink -f $0))/../
-    NIFI_HOME=$(readlink -f $NIFI_HOME)
+    NIFI_HOME=$(dirname $($READLINK -f $0))/../
+    NIFI_HOME=$($READLINK -f $NIFI_HOME)
     cd $NIFI_HOME
     echo "Directory changed to NIFI_HOME of '$NIFI_HOME'"
     if [ ! -d "$NIFI_HOME" ]; then