keith-turner commented on a change in pull request #883: Fixes #842 Support 
multiple ways for running Fluo applications
URL: https://github.com/apache/incubator-fluo/pull/883#discussion_r129386429
 
 

 ##########
 File path: modules/distribution/src/main/scripts/local-fluo
 ##########
 @@ -13,18 +13,24 @@
 # or implied. See the License for the specific language governing permissions 
and limitations under
 # the License.
 
-# Start: Resolve Script Directory
 SOURCE="${BASH_SOURCE[0]}"
-while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a 
symlink
+while [ -h "$SOURCE" ]; do
    bin="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
    SOURCE="$(readlink "$SOURCE")"
-   [[ $SOURCE != /* ]] && SOURCE="$bin/$SOURCE" # if $SOURCE was a relative 
symlink, we need to resolve it relative to the path where the symlink file was 
located
+   [[ $SOURCE != /* ]] && SOURCE="$bin/$SOURCE"
 done
-bin="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
-script=$( basename "$SOURCE" )
-# Stop: Resolve Script Directory
+# Set up variables needed by fluo-env.sh
+export bin="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
+export basedir="$( cd -P ${bin}/.. && pwd )"
+export conf="$basedir/conf"
+export lib="$basedir/lib"
+export cmd="$1"
+export FLUO_HOME="$basedir"
+FLUO_VERSION=${project.version}
 
-. "$bin"/impl/config.sh
+if [ -f "$conf/fluo-env.sh" ]; then
+  . "$conf"/fluo-env.sh
+fi
 
 Review comment:
   The help for script should print something about being deprecated.
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to