-
Notifications
You must be signed in to change notification settings - Fork 6
/
pfcli
executable file
·24 lines (22 loc) · 909 Bytes
/
pfcli
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash
if [[ -L "${BASH_SOURCE[0]}" ]]; then
DIR="$( cd "$( dirname $(readlink "${BASH_SOURCE[0]}") )" && pwd )"
else
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
fi
if [ `uname` = Linux ]; then
JCROOT=$DIR
if [ -f "$JCROOT/run-all.sh" ]; then
#means work in docker image
CPATH="$JCROOT/jconductor/pfconductor.jar:$JCROOT/jconductor/lib/*"
else
#means work in develop mode
CPATH="$JCROOT/out/production/jconductor:$JCROOT/lib/*"
fi
java -classpath "$CPATH" -Dorg.slf4j.simpleLogger.defaultLogLevel=ERROR com.netbric.s5.cli.CliMain $*
else
JCROOT=.
java -classpath "$JCROOT/out/production/jconductor;$JCROOT/lib/*" -Dorg.slf4j.simpleLogger.defaultLogLevel=ERROR com.netbric.s5.cli.CliMain $*
fi
# run pfcli in release image
#java -classpath "$JCROOT:$JCROOT/lib/*" -Dorg.slf4j.simpleLogger.defaultLogLevel=ERROR com.netbric.s5.cli.CliMain -c /etc/pureflash/pf.conf $*