diff options
author | Christopher Vogt <oss.nsp@cvogt.org> | 2016-03-06 11:48:45 -0500 |
---|---|---|
committer | Christopher Vogt <oss.nsp@cvogt.org> | 2016-03-06 14:31:35 -0500 |
commit | 9e683460dda16f8555a54dc12154c9d5c6b9d97c (patch) | |
tree | 83c9496f480cba1d60505a3381cf5580dd5e5423 /cbt | |
parent | 9787c385a1843e3fb8f564836bf960235ff0d87f (diff) | |
download | cbt-9e683460dda16f8555a54dc12154c9d5c6b9d97c.tar.gz cbt-9e683460dda16f8555a54dc12154c9d5c6b9d97c.tar.bz2 cbt-9e683460dda16f8555a54dc12154c9d5c6b9d97c.zip |
turn all cli output into std err output. This allows warnings not to screw up the output needed for cli interop
Diffstat (limited to 'cbt')
-rwxr-xr-x | cbt | 21 |
1 files changed, 10 insertions, 11 deletions
@@ -12,7 +12,7 @@ which javac 2>&1 > /dev/null javac_installed=$? if [ ! $javac_installed -eq 0 ]; then - echo "You need to install javac! CBT needs it to bootstrap from Java sources into Scala." 2>&1 + echo "You need to install javac! CBT needs it to bootstrap from Java sources into Scala." 1>&2 exit 1 fi javac_version=$(javac -version 2>&1 | cut -d ' ' -f 2) @@ -29,21 +29,21 @@ ng_server_installed=$? nailgun_installed=0 if [ ! $ng_installed -eq 0 ] || [ ! $ng_server_installed -eq 0 ]; then nailgun_installed=1 - echo "(Note: nailgun not found. It makes CBT faster! Try 'brew install nailgun'.)" 2>&1 + echo "(Note: nailgun not found. It makes CBT faster! Try 'brew install nailgun'.)" 1>&2 fi which realpath 2>&1 > /dev/null realpath_installed=$? which gcc 2>&1 > /dev/null gcc_installed=$? if [ ! $realpath_installed -eq 0 ] && [ ! $gcc_installed -eq 0 ]; then - echo "You need realpath or gcc installed! CBT needs it to locate itself reliably." 2>&1 + echo "You need realpath or gcc installed! CBT needs it to locate itself reliably." 1>&2 exit 1 fi which gpg 2>&1 > /dev/null gpg_installed=$? if [ ! $gpg_installed -eq 0 ]; then - echo "(Note: gpg not found. In order to use publishSigned you'll need it.)" 2>&1 + echo "(Note: gpg not found. In order to use publishSigned you'll need it.)" 1>&2 fi NAILGUN_PORT=4444 @@ -60,7 +60,6 @@ export NAILGUN=$CBT_HOME/nailgun_launcher/ export STAGE1=$CBT_HOME/stage1/ export TARGET=target/scala-2.11/classes/ INDICATOR=$STAGE1$TARGET/cbt/Stage1.class - mkdir -p $NAILGUN$TARGET mkdir -p $STAGE1$TARGET @@ -72,11 +71,11 @@ if [ $nc_installed -eq 0 ]; then nc -z -n -w 1 127.0.0.1 $NAILGUN_PORT > /dev/null 2>&1 server_up=$? else - echo "(Note: nc not found. It will make slightly startup faster.)" 2>&1 + echo "(Note: nc not found. It will make slightly startup faster.)" 1>&2 fi if [ ! $nc_installed -eq 0 ] || [ ! $server_up -eq 0 ]; then - echo "Starting up nailgun" 2>&1 + echo "Starting up nailgun" 1>&2 # try to start nailgun-server, just in case it's not up ng-server 127.0.0.1:$NAILGUN_PORT >> $NAILGUN/target/nailgun.stdout.log 2>> $NAILGUN/target/nailgun.stderr.log & fi @@ -84,7 +83,7 @@ fi #gdate +"%T.%N" # fetch / find scala jars export SCALA_CLASSPATH=`$CBT_HOME/bootstrap_scala/bootstrap_scala $SCALA_VERSION` -if [ ! $? -eq 0 ]; then echo "Problem with bootstrap_scala" 2>&1; exit 1; fi +if [ ! $? -eq 0 ]; then echo "Problem with bootstrap_scala" 1>&2; exit 1; fi #gdate +"%T.%N" # detect source changes in CBT itself @@ -119,9 +118,9 @@ then -d $STAGE1$TARGET\ `ls $STAGE1/*.scala` compiles2=$? - echo "Stopping nailgun" 2>&1 + echo "Stopping nailgun" 1>&2 $NG ng-stop >> $NAILGUN/target/nailgun.stdout.log 2>> $NAILGUN/target/nailgun.stderr.log & - echo "Restarting nailgun" 2>&1 + echo "Restarting nailgun" 1>&2 ng-server 127.0.0.1:$NAILGUN_PORT >> $NAILGUN/target/nailgun.stdout.log 2>> $NAILGUN/target/nailgun.stderr.log & fi @@ -168,7 +167,7 @@ then if [ "$1" = "loop" ] then while true; do - echo "======= Restarting CBT =======" 2>&1 + echo "======= Restarting CBT =======" 1>&2 build $* done fi |