1998-12-28 13:27:27 +00:00
|
|
|
#!/bin/sh
|
|
|
|
command=$1
|
|
|
|
shift
|
|
|
|
|
|
|
|
if pwd | grep -qF 2.2; then
|
|
|
|
branch=2.2
|
|
|
|
else
|
|
|
|
branch=3.0
|
|
|
|
fi
|
|
|
|
|
|
|
|
# ssh -x doesn't work on some machines
|
|
|
|
unset DISPLAY
|
|
|
|
|
|
|
|
pkgname=$(basename $1 .tgz)
|
|
|
|
buildroot=$(dirname $0)
|
|
|
|
|
|
|
|
if grep -qxF $pkgname ${buildroot}/${branch}/duds; then
|
|
|
|
echo "skipping $pkgname"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
args=${1+"$@"}
|
|
|
|
mach=$(cat ${buildroot}/ulist)
|
|
|
|
num=$(echo $(echo $mach | wc -w))
|
|
|
|
set $mach
|
|
|
|
shift $(echo "$$ $num" | awk '{srand($1); print(int(rand()*$2))}')
|
1999-01-22 10:00:08 +00:00
|
|
|
if [ "x$NOCLEAN" != "x" ]; then
|
|
|
|
echo "dispatching: ssh -a $1 ${command} ${branch} -noclean $args"
|
|
|
|
ssh -a $1 ${command} ${branch} -noclean $args
|
|
|
|
else
|
|
|
|
echo "dispatching: ssh -a $1 ${command} ${branch} $args"
|
|
|
|
ssh -a $1 ${command} ${branch} $args
|
|
|
|
fi
|