diff options
author | kris <kris@FreeBSD.org> | 2004-10-25 12:36:03 +0800 |
---|---|---|
committer | kris <kris@FreeBSD.org> | 2004-10-25 12:36:03 +0800 |
commit | 24c337be2895366d28349aeb1a69d730ff1c17df (patch) | |
tree | 1ce7b91cd72ddc1e3347f986ae7e1e99661273fe /Tools/portbuild | |
parent | c667baf409d2c54ef23e341067551449cfd5f67d (diff) | |
download | freebsd-ports-gnome-24c337be2895366d28349aeb1a69d730ff1c17df.tar.gz freebsd-ports-gnome-24c337be2895366d28349aeb1a69d730ff1c17df.tar.zst freebsd-ports-gnome-24c337be2895366d28349aeb1a69d730ff1c17df.zip |
Fix a couple of bugs in the extraction of this from dopackages, and
flatten the setupnode() function into the main body since it's only
called from one place.
Diffstat (limited to 'Tools/portbuild')
-rwxr-xr-x | Tools/portbuild/scripts/dosetupnode | 53 |
1 files changed, 20 insertions, 33 deletions
diff --git a/Tools/portbuild/scripts/dosetupnode b/Tools/portbuild/scripts/dosetupnode index 48d8790777ac..e17af71bbe23 100755 --- a/Tools/portbuild/scripts/dosetupnode +++ b/Tools/portbuild/scripts/dosetupnode @@ -4,44 +4,31 @@ pb=/var/portbuild arch=$1 branch=$2 -mach=$3 +node=$3 shift . ${pb}/${arch}/portbuild.conf . ${pb}/scripts/buildenv -# usage: setupnode pb arch scripts branch me node md5 tmpdir -setupnode () { - pb=$1 - arch=$2 - scripts=$3 - branch=$4 - me=$5 - node=$6 - md5=$7 - tmpdir=$8 - - echo "setting up of $node started at $(date)" - - # Read in client config and decide if the node is disconnected or not (i.e. mounts via NFS) - disconnected=0 - . ${pb}/${arch}/portbuild.${node} - - scp -p ${scripts}/setupnode ${client_user}@${node}:/tmp - ssh -n ${client_user}@${node} sh /tmp/setupnode ${me} ${pb} ${arch} ${branch} ${tmpdir} ${md5} ${disconnected} - - if [ "${disconnected}" = 1 ]; then - rsync ${rsync_gzip} -r -l -p --delete ${pb}/scripts ${client_user}@${node}:${pb}/ - rsync ${rsync_gzip} -r -l -p --delete ${pb}/${arch}/portbuild* ${client_user}@${node}:${pb}/${arch} - rsync ${rsync_gzip} -r -l -p --delete ${pb}/${arch}/${branch}/ports ${client_user}@${node}:${pb}/${arch}/${branch} - rsync ${rsync_gzip} -r -l -p --delete ${pb}/${arch}/${branch}/src ${client_user}@${node}:${pb}/${arch}/${branch} - rsync ${rsync_gzip} -r -l -p --delete ${pb}/${arch}/${branch}/doc ${client_user}@${node}:${pb}/${arch}/${branch} - rsync ${rsync_gzip} -r -l -p --delete ${pb}/${arch}/${branch}/tarballs/bindist* ${client_user}@${node}:${pb}/${arch}/${branch}/tarballs - fi - - echo "setting up of $node ended at $(date)" -} +echo "setting up of $node started at $(date)" + +# Read in client config and decide if the node is disconnected or not (i.e. mounts via NFS) +disconnected=0 +. ${pb}/${arch}/portbuild.${node} md5=$(/sbin/md5 ${pb}/${arch}/${branch}/tarballs/bindist.tar | awk '{print $4}') -setupnode ${pb} ${arch} ${pb}/scripts ${branch} $(hostname) ${mach} ${md5} ${scratchdir} + +scp -p ${pb}/scripts/setupnode ${client_user}@${node}:/tmp +ssh -n ${client_user}@${node} ${sudo_cmd} sh /tmp/setupnode $(hostname) ${pb} ${arch} ${branch} ${scratchdir} ${md5} ${disconnected} + +if [ "${disconnected}" = 1 ]; then + rsync ${rsync_gzip} -r -l -p --delete ${pb}/scripts ${client_user}@${node}:${pb}/ + rsync ${rsync_gzip} -r -l -p --delete ${pb}/${arch}/portbuild* ${client_user}@${node}:${pb}/${arch} + rsync ${rsync_gzip} -r -l -p --delete ${pb}/${arch}/${branch}/ports ${client_user}@${node}:${pb}/${arch}/${branch} + rsync ${rsync_gzip} -r -l -p --delete ${pb}/${arch}/${branch}/src ${client_user}@${node}:${pb}/${arch}/${branch} + rsync ${rsync_gzip} -r -l -p --delete ${pb}/${arch}/${branch}/doc ${client_user}@${node}:${pb}/${arch}/${branch} + rsync ${rsync_gzip} -r -l -p --delete ${pb}/${arch}/${branch}/tarballs/bindist* ${client_user}@${node}:${pb}/${arch}/${branch}/tarballs +fi + +echo "setting up of $node ended at $(date)" |