URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [contrib/] [reghunt/] [bin/] [gcc-svn-update-fix] - Rev 723
Compare with Previous | Blame | View Log
#! /bin/bash#set -ex# Update an SVN tree for a particular date.if [ $# != 1 ]; thenecho Usage: $0 idexit 1fiif [ "x${REG_DO_CLEANUPS}" != "x" ]; thenreg_cleanupfiID=$1BRANCH=""######################################################################### Get sources.########################################################################svn_get() {# In case there are problems with updates (there were with CVS),# creating a file called REMOVE in the REG_SRCDIR directory causes us# to start with a clean tree each time.unset LC_ALLunset LANGcd ${REG_SRCDIR}if [ -d gcc ]; then# There's already a tree; do an update with the new revision.cd gccecho "`date` svn update begun for id ${ID}, rev ${REV} (fix)"echo svn update --non-interactive --revision ${REV} >> $LOGsvn update --non-interactive --revision ${REV} >> $LOGif [ $? -eq 0 ]; thenecho "`date` svn update done"elseecho "`date` svn update failed"exit 1fielseecho "`date` svn checkout begun for id ${ID}, rev ${REV}"echo svn checkout --non-interactive --revision ${REV} \${REG_SVN_REPO}/${BRANCHPATH} gcc >> $LOGsvn checkout --non-interactive --revision ${REV} \${REG_SVN_REPO}/${BRANCHPATH} gcc >> $LOGif [ $? -eq 0 ]; thenecho "`date` svn checkout done"elseecho "`date` svn checkout failed"exit 1ficd gccfi# Touch generated files.contrib/gcc_update --touch >> $LOG}######################################################################### Main program########################################################################cd ${REG_SRCDIR}# This is a simple way to stop a long regression search fairly cleanly;# just touch a file called STOP.if [ -f STOP ]; thenecho "`date` $0 detected STOP file"rm -f STOPexit 1fi# Set up the log file.REV=`${REG_IDS} -f index -t rev ${ID}`LOG=${REG_SRCDIR}/logs/${BUGID}/${REV}.logmkdir -p ${REG_SRCDIR}/logs/${BUGID}rm -f $LOGtouch $LOG# Get the branch for this patch.BRANCH=`${REG_IDS} -f index -t branch ${ID}`if [ "${BRANCH}" = "error" ]; thenecho "`date` $0: cannot determine the SVN branch for id ${ID}"exit 1fiif [ "${BRANCH}" = "trunk" ]; thenBRANCHPATH=trunkelseBRANCHPATH=branches/${BRANCH}fisvn_get# Look for a patch that's needed for this revision to build.FIX=${REG_PATCHES}/${REV}.fixecho "`date` looking for $FIX"if [ -f $FIX ]; thenecho "`date` fix needed; checking whether it is already applied"cd ${REG_SRCDIR}/gccpatch --dry-run -s -p0 -i $FIX < /dev/null > /dev/null 2>&1if [ $? -eq 0 ]; thenecho "`date` applying fix"patch -s -p0 -i $FIXfifiexit 0
