From ef4d83caec3ac66272327052f461900ec1f05c5e Mon Sep 17 00:00:00 2001 From: asami Date: Tue, 29 Aug 2000 08:25:14 +0000 Subject: Instead of doing a pwd | grep (duh!) to find the branch we are building ports for, pass it as an argument. Pass NO_RESTRICTED, NOPLISTCHECK and NODUMMY to ssh as flags when said environment variables are set. --- Tools/portbuild/scripts/pdispatch | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) (limited to 'Tools/portbuild') diff --git a/Tools/portbuild/scripts/pdispatch b/Tools/portbuild/scripts/pdispatch index 0eaeecc5bcc9..1bb396d6df2d 100755 --- a/Tools/portbuild/scripts/pdispatch +++ b/Tools/portbuild/scripts/pdispatch @@ -3,16 +3,9 @@ # wait 5 hours maximum timeout=18000 -command=$1 -shift - -if pwd | grep -qF 2.2; then - branch=2.2 -elif pwd | grep -qF 3; then - branch=3 -else - branch=4 -fi +branch=$1 +command=$2 +shift 2 # ssh -x doesn't work on some machines unset DISPLAY @@ -30,10 +23,18 @@ mach=$(cat ${buildroot}/ulist) num=$(echo $(echo $mach | wc -w)) set $mach shift $(echo "$$ $num" | awk '{srand($1); print(int(rand()*$2))}') +flags="" if [ "x$NOCLEAN" != "x" ]; then - echo "dispatching: ssh -a $1 ${command} ${branch} -noclean $args" - ${buildroot}/scripts/ptimeout $timeout ssh -a $1 ${command} ${branch} -noclean $args -else - echo "dispatching: ssh -a $1 ${command} ${branch} $args" - ${buildroot}/scripts/ptimeout $timeout ssh -a $1 ${command} ${branch} $args + flags="${flags} -noclean" +fi +if [ "x$NO_RESTRICTED" != "x" ]; then + flags="${flags} -norestr" +fi +if [ "x$NOPLISTCHECK" != "x" ]; then + flags="${flags} -noplistcheck" +fi +if [ "x$NODUMMY" != "x" ]; then + flags="${flags} -nodummy" fi +echo "dispatching: ssh -a $1 ${command} ${branch} $flags $args" +${buildroot}/scripts/ptimeout $timeout ssh -a $1 ${command} ${branch} ${flags} $args -- cgit