1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-29 21:39:24 +00:00
freebsd-ports/Tools/portbuild/scripts/pdispatch
Satoshi Asami 68d197cd25 Add -t and -n flags to ssh. (-t flag suggested by: ps)
This seems to fix a lot of the hang problems to bump up the timeout from
5 hours to 12 hours.
2000-09-26 23:40:13 +00:00

41 lines
900 B
Bash
Executable File

#!/bin/sh
# wait 12 hours maximum
timeout=43200
branch=$1
command=$2
shift 2
# ssh -x doesn't work on some machines
unset DISPLAY
pkgname=$(basename $1 .tgz)
buildroot=$(dirname $(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))}')
flags=""
if [ "x$NOCLEAN" != "x" ]; then
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 -t -n $1 ${command} ${branch} $flags $args at $(date)"
${buildroot}/scripts/ptimeout $timeout ssh -a -t -n $1 ${command} ${branch} ${flags} $args