Skip to content

Commit

Permalink
Mac OS X run command added
Browse files Browse the repository at this point in the history
  • Loading branch information
ccmawo committed Apr 21, 2015
1 parent 0635a66 commit c24e028
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions mac-osx-run.command
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/sh

SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
TARGET="$(readlink "$SOURCE")"
if [[ $SOURCE == /* ]]; then
SOURCE="$TARGET"
else
DIR="$( dirname "$SOURCE" )"
SOURCE="$DIR/$TARGET" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
fi
done
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
echo "DIR is '$DIR'"

cd $DIR

java -cp nhz.jar:lib/*:conf nhz.Nhz

pause

0 comments on commit c24e028

Please sign in to comment.