Changeset View
Changeset View
Standalone View
Standalone View
Tools/scripts/tindex
| Show All 21 Lines | |||||
| REPORT_ADDRESS=root@localhost | REPORT_ADDRESS=root@localhost | ||||
| # Address for script errors | # Address for script errors | ||||
| ERROR_ADDRESS=root@localhost | ERROR_ADDRESS=root@localhost | ||||
| # Location of ports tree and source trees | # Location of ports tree and source trees | ||||
| export BASEDIR=/a/tindex | export BASEDIR=/a/tindex | ||||
| export PORTSDIR=${BASEDIR}/ports | export PORTSDIR=${BASEDIR}/ports | ||||
| export SRCDIR12=${BASEDIR}/src.12 | |||||
| export SRCDIR13=${BASEDIR}/src.13 | |||||
| export SRCDIR14=${BASEDIR}/src.14 | export SRCDIR14=${BASEDIR}/src.14 | ||||
| export OUTDIR=${BASEDIR}/out | export OUTDIR=${BASEDIR}/out | ||||
| # Target architecture if not set in the environment | # Target architecture if not set in the environment | ||||
| if [ "${ARCH}" = "" ]; then | if [ "${ARCH}" = "" ]; then | ||||
| export ARCH=i386 | export ARCH=i386 | ||||
| export MACHINE_ARCH=i386 | export MACHINE_ARCH=i386 | ||||
| fi | fi | ||||
| ▲ Show 20 Lines • Show All 68 Lines • ▼ Show 20 Lines | |||||
| export PORT_DBDIR=/nonexistent | export PORT_DBDIR=/nonexistent | ||||
| export PKG_DBDIR=/nonexistent | export PKG_DBDIR=/nonexistent | ||||
| export LOCALBASE=/nonexistent | export LOCALBASE=/nonexistent | ||||
| export INDEX_PRISTINE=1 | export INDEX_PRISTINE=1 | ||||
| export INDEX_JOBS=3 | export INDEX_JOBS=3 | ||||
| export INDEX_QUIET=1 | export INDEX_QUIET=1 | ||||
| # First update the source trees to get current OSVERSION | # First update the source trees to get current OSVERSION | ||||
| ${SVN} -q up ${SRCDIR12}/sys/sys | |||||
| OSVERSION12=$(awk '/^#define[[:blank:]]__FreeBSD_version/ {print $3}' < ${SRCDIR12}/sys/sys/param.h) | |||||
| ${GIT} -C ${SRCDIR13} pull --rebase -q | |||||
| OSVERSION13=$(awk '/^#define[[:blank:]]__FreeBSD_version/ {print $3}' < ${SRCDIR13}/sys/sys/param.h) | |||||
| ${GIT} -C ${SRCDIR14} pull --rebase -q | ${GIT} -C ${SRCDIR14} pull --rebase -q | ||||
| OSVERSION14=$(awk '/^#define[[:blank:]]__FreeBSD_version/ {print $3}' < ${SRCDIR14}/sys/sys/param.h) | OSVERSION14=$(awk '/^#define[[:blank:]]__FreeBSD_version/ {print $3}' < ${SRCDIR14}/sys/sys/param.h) | ||||
| cd ${PORTSDIR} | cd ${PORTSDIR} | ||||
| for ver in 12 13 14; do | for ver in 14; do | ||||
| rm -f INDEX-${ver} INDEX-${ver}.bz2 INDEX-${ver}.xz INDEX-${ver}.zst | rm -f INDEX-${ver} INDEX-${ver}.bz2 INDEX-${ver}.xz INDEX-${ver}.zst | ||||
| done | done | ||||
| OLD_HEAD=$(${GIT} rev-parse HEAD) | OLD_HEAD=$(${GIT} rev-parse HEAD) | ||||
| if ! ${GIT} pull --ff-only > git.log 2>&1 ; then | if ! ${GIT} pull --ff-only > git.log 2>&1 ; then | ||||
| (echo "Git update failed with conflicts:"; | (echo "Git update failed with conflicts:"; | ||||
| cat git.log) | mail -s "Ports Git update failed" ${ERROR_ADDRESS} | cat git.log) | mail -s "Ports Git update failed" ${ERROR_ADDRESS} | ||||
| exit 1 | exit 1 | ||||
| Show All 26 Lines | |||||