nano_receiver=0
wait=1
rebuild=0
+verbose=0
while [[ $1 == -* ]]
do
nano_receiver=1
;;
-n) nmsg=$2; shift;;
+ -v) verbose=1;;
*) echo "unrecognised option: $1"
echo "usage: $0 [-B] [-d micor-sec-delay] [-N] [-n num-msgs]"
shift
done
+if (( verbose ))
+then
+ echo "2" >.verbose
+ export RMR_VCTL_FILE=".verbose"
+fi
+
if (( rebuild ))
then
build_path=../../.build
-
- (
- set -e
- mkdir -p $build_path
- cd ${build_path%/*} # cd barfs on ../../.build, so we do this
- cd ${build_path##*/}
- cmake ..
- make package
- )
- if (( $? != 0 ))
- then
- echo "build failed"
- exit 1
- fi
+ set -e
+ ksh ./rebuild.ksh
+ set +e
else
build_path=${BUILD_PATH:-"../../.build"} # we prefer .build at the root level, but allow user option
fi
run_rcvr &
+sleep 2 # if sender starts faster than rcvr we can drop, so pause a bit
run_sender &
wait
fi
rm /tmp/PID$$.*
+rm -f .verbose
exit $(( !! (src + rrc) ))