diff options
author | kris <kris@FreeBSD.org> | 2003-02-14 17:26:20 +0800 |
---|---|---|
committer | kris <kris@FreeBSD.org> | 2003-02-14 17:26:20 +0800 |
commit | 62521d1c366f9aeba30f9fa1710be5b11fe03695 (patch) | |
tree | 7a692d3ce4a68e7ddbd10aaa7858bdbaf7dcaa08 /Tools/portbuild | |
parent | f0222e3adbe1ceffd65dc8c6a1c6aed8333dec5f (diff) | |
download | freebsd-ports-gnome-62521d1c366f9aeba30f9fa1710be5b11fe03695.tar.gz freebsd-ports-gnome-62521d1c366f9aeba30f9fa1710be5b11fe03695.tar.zst freebsd-ports-gnome-62521d1c366f9aeba30f9fa1710be5b11fe03695.zip |
Work around broken rand() in -current by changing the way we pick a
random build host.
Diffstat (limited to 'Tools/portbuild')
-rwxr-xr-x | Tools/portbuild/scripts/pdispatch | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Tools/portbuild/scripts/pdispatch b/Tools/portbuild/scripts/pdispatch index 212844094314..2f01f60615d9 100755 --- a/Tools/portbuild/scripts/pdispatch +++ b/Tools/portbuild/scripts/pdispatch @@ -31,10 +31,10 @@ if grep -qxF $pkgname ${pb}/${arch}/${branch}/duds; then fi args=${1+"$@"} -mach=$(cat ${pb}/${arch}/ulist) -num=$(echo $(echo $mach | wc -w)) +num=$(wc -w ${pb}/${arch}/ulist | awk '{print $1}') +random=$(jot -r 1 1 ${num}) +mach=$(cat ${pb}/${arch}/ulist | cut -f ${random} -d ' ' ) set $mach -shift $(echo "$$ $num" | awk '{srand($1); print(int(rand()*$2))}') flags="" if [ "x$NOCLEAN" != "x" ]; then flags="${flags} -noclean" |