diff options
author | Erwin Lansing <erwin@FreeBSD.org> | 2008-12-27 21:24:30 +0000 |
---|---|---|
committer | Erwin Lansing <erwin@FreeBSD.org> | 2008-12-27 21:24:30 +0000 |
commit | 9f53e58103e0a3bfd4f56ffdf4e9305e91d61070 (patch) | |
tree | fbb3c890d9bae803c5bedef2938e9529401bbf76 /Tools | |
parent | 19779835ce107d595af0a5f7ef2cc489d8dedbf1 (diff) | |
download | ports-9f53e58103e0a3bfd4f56ffdf4e9305e91d61070.tar.gz ports-9f53e58103e0a3bfd4f56ffdf4e9305e91d61070.zip |
Notes
Diffstat (limited to 'Tools')
-rwxr-xr-x | Tools/scripts/tindex | 57 |
1 files changed, 16 insertions, 41 deletions
diff --git a/Tools/scripts/tindex b/Tools/scripts/tindex index deb6af315593..4eb9be9314e2 100755 --- a/Tools/scripts/tindex +++ b/Tools/scripts/tindex @@ -158,51 +158,26 @@ if grep -q ^C cvs.log ; then grep ^C cvs.log) | mail -s "Ports cvsup failed" ${ERROR_ADDRESS} exit 1 fi - -BRANCH=6.x -export OSVERSION=${OSVERSION6} -echo "Building INDEX for ${BRANCH} with OSVERSION=${OSVERSION}" -cd ${PORTSDIR} -((make index 2> index.err) > index.out) || indexfail ${BRANCH} -if [ -s index.err ]; then - indexfail ${BRANCH} -fi -checkfixed ${BRANCH} -createtmpdir -bzip2 -kf ${PORTSDIR}/INDEX-6 -scp -q ${SSHKEY} ${PORTSDIR}/INDEX-6 ${PORTSDIR}/INDEX-6.bz2 ${SCP_DEST_HOST}:${TMPDIR} || mail -s "Cannot copy INDEX-6 to temp dir" ${ERROR_ADDRESS} -ssh ${SCP_DEST_HOST} "/bin/mv ${TMPDIR}/INDEX-6 ${SCP_DEST_DIR}; /bin/mv ${TMPDIR}/INDEX-6.bz2 ${SCP_DEST_DIR}; rmdir ${TMPDIR}" || mail -s "Cannot move INDEX-6 to final dir" ${ERROR_ADDRESS} - -BRANCH=7.x -export OSVERSION=${OSVERSION7} -echo "Building INDEX for ${BRANCH} with OSVERSION=${OSVERSION}" -cd ${PORTSDIR} -((make index 2> index.err) > index.out) || indexfail ${BRANCH} -if [ -s index.err ]; then - indexfail ${BRANCH} -fi -checkfixed ${BRANCH} +for branch in 6.x 7.x 8.x; do + release=$(echo $branch | sed -e 's,.x,,') -createtmpdir -bzip2 -kf ${PORTSDIR}/INDEX-7 -scp -q ${SSHKEY} ${PORTSDIR}/INDEX-7 ${PORTSDIR}/INDEX-7.bz2 ${SCP_DEST_HOST}:${TMPDIR} || mail -s "Cannot copy INDEX-7 to temp dir" ${ERROR_ADDRESS} -ssh ${SCP_DEST_HOST} "/bin/mv ${TMPDIR}/INDEX-7 ${SCP_DEST_DIR}; /bin/mv ${TMPDIR}/INDEX-7.bz2 ${SCP_DEST_DIR}; rmdir ${TMPDIR}" || mail -s "Cannot move INDEX-7 to final dir" ${ERROR_ADDRESS} + eval _osver=\$OSVERSION${release} + export OSVERSION=${_osver} -BRANCH=8.x -export OSVERSION=${OSVERSION8} -echo "Building INDEX for ${BRANCH} with OSVERSION=${OSVERSION}" -cd ${PORTSDIR} -((make index 2> index.err) > index.out) || indexfail ${BRANCH} -if [ -s index.err ]; then - indexfail ${BRANCH} -fi -checkfixed ${BRANCH} + echo "Building INDEX for ${branch} with OSVERSION=${OSVERSION}" + cd ${PORTSDIR} + ((make index 2> index.err) > index.out) || indexfail ${branch} + if [ -s index.err ]; then + indexfail ${branch} + fi + checkfixed ${branch} -createtmpdir -bzip2 -kf ${PORTSDIR}/INDEX-8 -scp -q ${SSHKEY} ${PORTSDIR}/INDEX-8 ${PORTSDIR}/INDEX-8.bz2 ${SCP_DEST_HOST}:${TMPDIR} || mail -s "Cannot copy INDEX-8 to temp dir" ${ERROR_ADDRESS} -ssh ${SCP_DEST_HOST} "/bin/mv ${TMPDIR}/INDEX-8 ${SCP_DEST_DIR}; /bin/mv ${TMPDIR}/INDEX-8.bz2 ${SCP_DEST_DIR}; rmdir ${TMPDIR}" || mail -s "Cannot move INDEX-8 to final dir" ${ERROR_ADDRESS} + createtmpdir + bzip2 -kf ${PORTSDIR}/INDEX-${release} + scp -q ${SSHKEY} ${PORTSDIR}/INDEX-${release} ${PORTSDIR}/INDEX-${release}.bz2 ${SCP_DEST_HOST}:${TMPDIR} || mail -s "Cannot copy INDEX-${release} to temp dir" ${ERROR_ADDRESS} + ssh ${SCP_DEST_HOST} "/bin/mv ${TMPDIR}/INDEX-${release} ${SCP_DEST_DIR}; /bin/mv ${TMPDIR}/INDEX-${release}.bz2 ${SCP_DEST_DIR}; rmdir ${TMPDIR}" || mail -s "Cannot move INDEX-${release} to final dir" ${ERROR_ADDRESS} +done # All indexes built successfully, clear the hook rm -f ${PORTSDIR}/hook |