diff options
author | Christopher Vogt <oss.nsp@cvogt.org> | 2016-11-08 00:30:51 +0000 |
---|---|---|
committer | Christopher Vogt <oss.nsp@cvogt.org> | 2016-11-08 00:12:42 -0500 |
commit | e60a2203eb55fe5259663da1b3cc85a302505de4 (patch) | |
tree | a47055089fed3c0b2a3687f6764fea03e7b7ceee /cbt | |
parent | 9f17b211154bdd9f0a0fe1ca0125287641ad602c (diff) | |
download | cbt-e60a2203eb55fe5259663da1b3cc85a302505de4.tar.gz cbt-e60a2203eb55fe5259663da1b3cc85a302505de4.tar.bz2 cbt-e60a2203eb55fe5259663da1b3cc85a302505de4.zip |
Fix escaping of spaces in cbt arguments
Diffstat (limited to 'cbt')
-rwxr-xr-x | cbt | 38 |
1 files changed, 19 insertions, 19 deletions
@@ -54,7 +54,7 @@ log () { fi } -log "Checking for dependencies" $* +log "Checking for dependencies" "$@" which javac 2>&1 > /dev/null javac_installed=$? @@ -63,12 +63,12 @@ if [ ! $javac_installed -eq 0 ]; then exit 1 fi -# log "cutting javac version" $* +# log "cutting javac version" "$@" # javac_version=$(javac -version 2>&1) # e.g. "javac 1.8.0_u60" # javac_version_update=${javac_version/javac 1./} # e.g. "8.0_u60" # javac_version_minor_pointed=${javac_version_update%_*} # e.g. "8.0" # javac_version_minor=${javac_version_minor_pointed%.*} # e.g. "8" -# log "cutting javac version done" $* +# log "cutting javac version done" "$@" # if [ ! "$javac_version_minor" -ge "7" ]; then # echo "You need to install javac version 1.7 or greater!" 2>&1 # echo "Current javac version is $javac_version" 2>&1 @@ -103,7 +103,7 @@ NG="$NG_EXECUTABLE --nailgun-port $NAILGUN_PORT" CWD=$(pwd) _DIR=$(dirname $(readlink "$0") 2>/dev/null || dirname "$0" 2>/dev/null ) -log "Find out real path. Build realpath if needed." $* +log "Find out real path. Build realpath if needed." "$@" export CBT_HOME=$(dirname $($_DIR/realpath/realpath.sh $0)) @@ -140,7 +140,7 @@ fi which nc 2>&1 > /dev/null nc_installed=$? -log "Check for running nailgun with nc." $* +log "Check for running nailgun with nc." "$@" server_up=1 if [ $nc_installed -eq 0 ]; then @@ -156,13 +156,13 @@ if [ $nailgun_installed -eq 1 ] || [ "$1" = "publishSigned" ] || [ "$2" = "publi fi if [ $use_nailgun -eq 0 ] && [ ! $server_up -eq 0 ]; then - log "Starting background process (nailgun)" $* + log "Starting background process (nailgun)" "$@" # try to start nailgun-server, just in case it's not up $NG_SERVER 127.0.0.1:$NAILGUN_PORT >> $nailgun_out 2>> $nailgun_err & fi stage1 () { - log "Checking for changes in cbt/nailgun_launcher" $* + log "Checking for changes in cbt/nailgun_launcher" "$@" NAILGUN_INDICATOR=$NAILGUN$TARGET/cbt/NailgunLauncher.class changed=0 for file in `ls $NAILGUN/*.java`; do @@ -188,20 +188,20 @@ stage1 () { fi fi - log "run CBT and loop if desired. This allows recompiling CBT itself as part of compile looping." $* + log "run CBT and loop if desired. This allows recompiling CBT itself as part of compile looping." "$@" if [ $use_nailgun -eq 1 ] then - log "Running JVM directly" $* + log "Running JVM directly" "$@" # -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=localhost:5005 # JVM options to improve startup time. See https://github.com/cvogt/cbt/pull/262 - java $JAVA_OPTS -Xmx6072m -Xss10M -XX:+TieredCompilation -XX:TieredStopAtLevel=1 -Xverify:none -cp $NAILGUN$TARGET cbt.NailgunLauncher $(time_taken) "$CWD" $* + java $JAVA_OPTS -Xmx6072m -Xss10M -XX:+TieredCompilation -XX:TieredStopAtLevel=1 -Xverify:none -cp $NAILGUN$TARGET cbt.NailgunLauncher $(time_taken) "$CWD" "$@" else - log "Running via background process (nailgun)" $* + log "Running via background process (nailgun)" "$@" for i in 0 1 2 3 4 5 6 7 8 9; do - log "Adding classpath." $* + log "Adding classpath." "$@" $NG ng-cp $NAILGUN$TARGET >> $nailgun_out 2>> $nailgun_err - log "Checking if nailgun is up yet." $* + log "Checking if nailgun is up yet." "$@" $NG cbt.NailgunLauncher check-alive >> $nailgun_out 2>> $nailgun_err alive=$? if [ $alive -eq 131 ] || [ $alive -eq 33 ]; then @@ -210,22 +210,22 @@ stage1 () { #elif [ $alive -eq 33 ]; then break else - log "Nope. Sleeping for 0.5 seconds" $* + log "Nope. Sleeping for 0.5 seconds" "$@" #if [ "$i" -gt 1 ]; then # echo "Waiting for nailgun to start... (In case of problems try -Dlog=nailgun or check logs in cbt/nailgun_launcher/target/*.log)" 1>&2 #fi fi sleep 0.3 done - log "Running CBT via Nailgun." $* - $NG cbt.NailgunLauncher $(time_taken) "$CWD" $* + log "Running CBT via Nailgun." "$@" + $NG cbt.NailgunLauncher $(time_taken) "$CWD" "$@" fi exitCode=$? - log "Done running CBT." $* + log "Done running CBT." "$@" } while true; do - stage1 $* + stage1 "$@" if [ ! "$1" = "loop" ]; then break fi @@ -236,5 +236,5 @@ if [ $compiles -ne 0 ]; then exitCode=1 fi -log "Exiting CBT" $* +log "Exiting CBT" "$@" exit $exitCode |