diff options
author | linimon <linimon@FreeBSD.org> | 2010-06-26 06:51:05 +0800 |
---|---|---|
committer | linimon <linimon@FreeBSD.org> | 2010-06-26 06:51:05 +0800 |
commit | 420b235f038cd1686645b7ab4c2a251f9fef020d (patch) | |
tree | 15b7e087fb920383130eb479dad5427401050357 /Tools | |
parent | f235bbeb782e41477d3c1f6d8439905dc8c2fb1f (diff) | |
download | freebsd-ports-gnome-420b235f038cd1686645b7ab4c2a251f9fef020d.tar.gz freebsd-ports-gnome-420b235f038cd1686645b7ab4c2a251f9fef020d.tar.zst freebsd-ports-gnome-420b235f038cd1686645b7ab4c2a251f9fef020d.zip |
Generalize the packge building scripts to be able to be run on more than
one 'head' node, rather than just pointyhat itself.
Constants are factored out into installation-specific files known as
portbuild/conf/server.conf and portbuild/conf/client.conf. There is
only one server.conf file. Individual <arch> directories may have
their own client.conf files, or may symlink to ../conf/client.conf.
While here, fix a but in the handling of the 'all' case.
Feature safe: yes
Diffstat (limited to 'Tools')
-rwxr-xr-x | Tools/portbuild/scripts/allgohans | 11 | ||||
-rwxr-xr-x | Tools/portbuild/scripts/allgohans.safe | 9 |
2 files changed, 13 insertions, 7 deletions
diff --git a/Tools/portbuild/scripts/allgohans b/Tools/portbuild/scripts/allgohans index aa851b729e7c..21cc660cbc6f 100755 --- a/Tools/portbuild/scripts/allgohans +++ b/Tools/portbuild/scripts/allgohans @@ -12,7 +12,7 @@ doarch() { fi machines=$(awk '{print $1}' ${pb}/${arch}/mlist) - + for i in ${machines}; do . ${pb}/${arch}/portbuild.conf if [ -f "${pb}/${arch}/portbuild.${i}" ]; then @@ -25,10 +25,11 @@ doarch() { done } +parm=$1 +shift id=$(whoami) if [ "${id}" = "root" ]; then - arch=$1 - shift + arch=${parm} root=1 else arch=$(echo $id | sed s,ports-,,) @@ -43,7 +44,9 @@ else fi pb=/var/portbuild -if [ "${arch}" = "all" ]; then +. ${pb}/conf/server.conf + +if [ "${parm}" = "all" ]; then arches=$(find ${pb}/*/portbuild.conf) for i in ${arches}; do arch=$(basename $(dirname $i)) diff --git a/Tools/portbuild/scripts/allgohans.safe b/Tools/portbuild/scripts/allgohans.safe index a8dd5fbc110c..ce79fc1f9c71 100755 --- a/Tools/portbuild/scripts/allgohans.safe +++ b/Tools/portbuild/scripts/allgohans.safe @@ -29,10 +29,11 @@ doarch() { done } +parm=$1 +shift id=$(whoami) if [ "${id}" = "root" ]; then - arch=$1 - shift + arch=${parm} root=1 else arch=$(echo $id | sed s,ports-,,) @@ -47,7 +48,9 @@ else fi pb=/var/portbuild -if [ "${arch}" = "all" ]; then +. ${pb}/conf/server.conf + +if [ "${parm}" = "all" ]; then arches=$(find ${pb}/*/portbuild.conf) for i in ${arches}; do arch=$(basename $(dirname $i)) |