diff options
| author | luccioman <luccioman@users.noreply.github.com> | 2016-09-03 14:46:58 +0200 |
|---|---|---|
| committer | luccioman <luccioman@users.noreply.github.com> | 2016-09-03 14:46:58 +0200 |
| commit | 421a6e3a95ee7db257a79c35c5bb3bf6067d676b (patch) | |
| tree | a4644bfff40f40b8b3cbe29e6cb4188dcc3375ce /startYACY.sh | |
| parent | 24b87412921c6e247d28e7fbe19b388d4124e71e (diff) | |
Fixed options processing for Mac OS
- getopt is BSD style and does not support long options
- fixed typing error inparameter value extracting for all platforms
Diffstat (limited to 'startYACY.sh')
| -rwxr-xr-x | startYACY.sh | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/startYACY.sh b/startYACY.sh index 5e52a9292..f935ae2e3 100755 --- a/startYACY.sh +++ b/startYACY.sh @@ -40,7 +40,7 @@ Options -l, --logging save the output of YaCy to yacy.log -d, --debug show the output of YaCy on the console -p, --print-out only print the command, which would be executed to start YaCy - --start, --startup [data-path] start YaCy using the specified data folder path, relative to the current user home + -s, --startup [data-path] start YaCy using the specified data folder path, relative to the current user home -g, --gui start a gui for YaCy USAGE } @@ -48,16 +48,16 @@ USAGE #startup YaCy cd "`dirname $0`" -if [ $OS = "OpenBSD" ] +if [ $OS = "OpenBSD" ] || [ $OS = "Darwin" ] then if [ $(echo $@ | grep -o "\-\-" | wc -l) -ne 0 ] then echo "WARNING: Unfortunately this script does not support long options in $OS." fi - options="`getopt hdlptg: $*`" + options="`getopt hdlptsg: $*`" else - options="`getopt -n YaCy -o h,d,l,p,t,g -l help,debug,logging,print-out,tail-log,gui,start,startup -- $@`" + options="`getopt -n YaCy -o h,d,l,p,t,s,g -l help,debug,logging,print-out,tail-log,startup,gui -- $@`" fi if [ $? -ne 0 ];then @@ -103,7 +103,7 @@ for option in $options;do -t|--tail-log) TAILLOG=1 ;; - -start|-startup) + -s|-startup) STARTUP=1 isparameter=1 ;; @@ -113,7 +113,7 @@ for option in $options;do ;; esac #case option else #parameter - if [ x$option = "--" ];then #option / parameter separator + if [ $option = "--" ];then #option / parameter separator isparameter=1; continue else |
