From 87c501cb78c198f90a27d6fa0fac16358d267aef Mon Sep 17 00:00:00 2001 From: "mcafee%netscape.com" Date: Mon, 31 Jan 2000 21:59:21 +0000 Subject: [PATCH] Save child PID. other minor stuff. git-svn-id: svn://10.0.0.236/trunk@59278 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/tools/tinderbox/tinderbox | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/mozilla/tools/tinderbox/tinderbox b/mozilla/tools/tinderbox/tinderbox index 3db842843dd..4badef5c534 100755 --- a/mozilla/tools/tinderbox/tinderbox +++ b/mozilla/tools/tinderbox/tinderbox @@ -41,17 +41,11 @@ build_type="$1" build_action="$2" # Depend or clobber build? -case "$1" in - depend) - treeOption="depend" - ;; - clobber) - treeOption="clobber" - ;; - *) - tinderbox_usage - exit 1 -esac +if [ "$build_type" != "depend" -a \ + "$build_type" != "clobber" ]; then + echo "Unknown option: $1" + tinderbox_usage +fi # See how we were called. case "$build_action" in @@ -61,17 +55,18 @@ case "$build_action" in echo "$build_type build already running with PID "`cat $build_type.pid` else nohup ./build-seamonkey.pl --$build_type & - echo "PID $$" - echo $$ > $build_type.pid + echo "PID $!" + echo $! > $build_type.pid fi ;; stop) - echo "Shutting down $build_type tinderbox..." if test -f $build_type.pid; then pid=`cat $build_type.pid` - echo "kill $pid" - kill `$pid` + echo "Shutting down $build_type tinderbox, PID = $pid" + kill $pid \rm $build_type.pid + else + echo "$build_type is not running." fi echo ;;