Changes in scripts/patch/gcc-patch.sh [d8a9d8b:3820147]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
scripts/patch/gcc-patch.sh
rd8a9d8b r3820147 20 20 # Download GCC Source 21 21 # 22 install -d ~/tmp 23 cd ~/tmp 22 cd /usr/src 24 23 if ! [ -e gcc-${VERSION}.tar.bz2 ]; then 25 24 wget ftp://gcc.gnu.org/pub/gcc/releases/gcc-${VERSION}/gcc-${VERSION}.tar.bz2 … … 28 27 # Set Patch Number 29 28 # 30 cd ~/tmp29 cd /usr/src 31 30 wget http://svn.cross-lfs.org/svn/repos/cross-lfs/trunk/patches/ --no-remove-listing > /dev/null 2>&1 32 31 PATCH_NUM=$(cat index.html | grep gcc | grep "${VERSION}" | grep branch_update | cut -f2 -d'"' | cut -f1 -d'"'| cut -f4 -d- | cut -f1 -d. | tail -n 1) … … 38 37 # Cleanup Directory 39 38 # 40 cd ~/tmp41 39 rm -rf gcc-${VERSION} gcc-${VERSION}.orig 42 40 tar xvf gcc-${VERSION}.tar.bz2 43 41 mv gcc-${VERSION} gcc-${VERSION}.orig 42 CURRENTDIR=$(pwd -P) 44 43 45 44 # Get Current Updates from SVN 46 45 # 47 cd ~/tmp46 cd /usr/src 48 47 NUM1=$(echo ${VERSION} | cut -f1 -d.) 49 48 NUM2=$(echo ${VERSION} | cut -f2 -d.) … … 54 53 # Add a custom version string 55 54 # 56 cd ~/tmp57 55 DATE_STAMP=$(cat gcc-${VERSION}/gcc/DATESTAMP) 58 56 echo "${VERSION}" > gcc-${VERSION}/gcc/BASE-VER … … 61 59 # Cleanup 62 60 # 63 cd ~/tmp64 61 DIRS="gcc-${VERSION} gcc-${VERSION}.orig" 65 62 for DIRECTORY in ${DIRS}; do 66 cd ~/tmp/${DIRECTORY}63 cd ${DIRECTORY} 67 64 REMOVE="ABOUT-NLS COPYING COPYING.LIB MAINTAINERS Makefile.def 68 65 Makefile.in Makefile.tpl README README.SCO BUGS FAQ LAST_UPDATED 69 66 MD5SUMS NEWS bugs.html faq.html gcc/BASE-VER gcc/DEV-PHASE 70 gcc/f/BUGS gcc/f/NEWS gcc/gengtype-lex.c" 67 gcc/f/BUGS gcc/f/NEWS gcc/c-parse.c gcc/gengtype-lex.c gcc/c-parse.y 68 gcc/gengtype-yacc.c gcc/gengtype-yacc.h gcc/java/parse-scan.c 69 gcc/java/parse.c gcc/objc/objc-parse.c gcc/objc/objc-parse.y 70 libjava/classpath/doc/cp-tools.info" 71 71 for file in ${REMOVE}; do 72 72 rm -f $file 73 73 done 74 74 for file in $(find . -name "ChangeLog*" | sed -e 's@./@@'); do 75 rm -f v${file}75 rm -f ${file} 76 76 done 77 REMVOVE_DIRS="INSTALL" 78 for dir in ${REMOVE_DIRS}; do 79 rm -rfv ${dir} 80 done 81 rm -fv fastjar/*.{1,info} gcc/doc/*.{1,info,7} gcc/fortran/*.{1,info,7} gcc/po/*.{gmo,po} 82 rm -rf libcpp/po/*.{gmo,po} libgomp/*.{1,info,7} libjava/classpath/doc/*.{1,info} 83 cd .. 77 rm -rf INSTALL 78 rm -f fastjar/*.{1,info} gcc/doc/*.{1,info,7} gcc/fortran/*.{1,info,7} 79 rm -f gcc/po/*.{gmo,po} libcpp/po/*.{gmo,po} libgomp/*.{1,info,7} 80 rm -f libjava/classpath/doc/*.{1,info} 81 cd .. 84 82 done 85 83 86 84 # Create Patch 87 85 # 88 cd ~/tmp 89 install -d ~/patches 90 echo "Submitted By: Jim Gifford (jim at cross-lfs dot org)" > ~/patches/gcc-${VERSION}-branch_update-${PATCH_NUM}.patch 91 echo "Date: `date +%m-%d-%Y`" >> ~/patches/gcc-${VERSION}-branch_update-${PATCH_NUM}.patch 92 echo "Initial Package Version: ${VERSION}" >> ~/patches/gcc-${VERSION}-branch_update-${PATCH_NUM}.patch 93 echo "Origin: Upstream" >> ~/patches/gcc-${VERSION}-branch_update-${PATCH_NUM}.patch 94 echo "Upstream Status: Applied" >> ~/patches/gcc-${VERSION}-branch_update-${PATCH_NUM}.patch 95 echo "Description: This is a branch update for gcc-${VERSION}, and should be" >> ~/patches/gcc-${VERSION}-branch_update-${PATCH_NUM}.patch 96 echo " rechecked periodically." >> ~/patches/gcc-${VERSION}-branch_update-${PATCH_NUM}.patch 97 echo "" >> ~/patches/gcc-${VERSION}-branch_update-${PATCH_NUM}.patch 98 echo "This patch was made from Revision # ${REVISION}." >> ~/patches/gcc-${VERSION}-branch_update-${PATCH_NUM}.patch 99 echo "" >> ~/patches/gcc-${VERSION}-branch_update-${PATCH_NUM}.patch 100 diff -Naur gcc-${VERSION}.orig gcc-${VERSION} >> ~/patches/gcc-${VERSION}-branch_update-${PATCH_NUM}.patch 101 echo "Created ~/patches/gcc-${VERSION}-branch_update-${PATCH_NUM}.patch." 86 cd /usr/src 87 echo "Submitted By: Jim Gifford (jim at cross-lfs dot org)" > gcc-${VERSION}-branch_update-${PATCH_NUM}.patch 88 echo "Date: `date +%m-%d-%Y`" >> gcc-${VERSION}-branch_update-${PATCH_NUM}.patch 89 echo "Initial Package Version: ${VERSION}" >> gcc-${VERSION}-branch_update-${PATCH_NUM}.patch 90 echo "Origin: Upstream" >> gcc-${VERSION}-branch_update-${PATCH_NUM}.patch 91 echo "Upstream Status: Applied" >> gcc-${VERSION}-branch_update-${PATCH_NUM}.patch 92 echo "Description: This is a branch update for gcc-${VERSION}, and should be" >> gcc-${VERSION}-branch_update-${PATCH_NUM}.patch 93 echo " rechecked periodically." >> gcc-${VERSION}-branch_update-${PATCH_NUM}.patch 94 echo "" >> gcc-${VERSION}-branch_update-${PATCH_NUM}.patch 95 echo "This patch was made from Revision # ${REVISION}." >> gcc-${VERSION}-branch_update-${PATCH_NUM}.patch 96 echo "" >> gcc-${VERSION}-branch_update-${PATCH_NUM}.patch 97 diff -Naur gcc-${VERSION}.orig gcc-${VERSION} >> gcc-${VERSION}-branch_update-${PATCH_NUM}.patch 98 echo "Created /usr/src/gcc-${VERSION}-branch_update-${PATCH_NUM}.patch." 102 99 103 100 # Create Another Copy to create fixes patch 104 101 # 105 cd ~/tmp 102 cd /usr/src 103 rm -rf gcc-${VERSION}.orig 104 cp -ar gcc-${VERSION} gcc-${VERSION}.orig 105 106 # Apply Patches from directories 107 # 108 cd /usr/src/gcc-${VERSION} 106 109 if [ -e ${PATCH_DIR}/${VERSION} ]; then 107 rm -rf gcc-${VERSION}.orig108 cp -ar gcc-${VERSION} gcc-${VERSION}.orig109 110 # Apply Patches from directories111 #112 cd ~/tmp/gcc-${VERSION}113 110 PATCH_FILES=$(ls ${PATCH_DIR}/${VERSION}/*.patch) 114 111 if [ "${PATCH_FILES}" != "" ]; then … … 130 127 done 131 128 fi 132 133 # Cleanup Directory134 #135 cd ~/tmp/gcc-${VERSION}136 rm -f $(find * -name "*~")137 rm -f $(find * -name "*.orig")138 rm -f $(find * -name "*.rej")139 rm -f *.orig *~ *.rej140 141 # Create Patch142 #143 cd ~/tmp144 install -d ~/patches145 echo "Submitted By: Jim Gifford (jim at cross-lfs dot org)" > ~/patches/gcc-${VERSION}-fixes-${PATCH_NUM2}.patch146 echo "Date: `date +%m-%d-%Y`" >> ~/patches/gcc-${VERSION}-fixes-${PATCH_NUM2}.patch147 echo "Initial Package Version: ${VERSION}" >> ~/patches/gcc-${VERSION}-fixes-${PATCH_NUM2}.patch148 echo "Origin: Upstream" >> ~/patches/gcc-${VERSION}-fixes-${PATCH_NUM2}.patch149 echo "Upstream Status: Applied" >> ~/patches/gcc-${VERSION}-fixes-${PATCH_NUM2}.patch150 echo "Description: This Patch contains fixes for gcc-${VERSION}, and should be" >> ~/patches/gcc-${VERSION}-fixes-${PATCH_NUM2}.patch151 echo " rechecked periodically." >> ~/patches/gcc-${VERSION}-fixes-${PATCH_NUM2}.patch152 echo "" >> ~/patches/gcc-${VERSION}-fixes-${PATCH_NUM2}.patch153 diff -Naur gcc-${VERSION}.orig gcc-${VERSION} >> ~/patches/gcc-${VERSION}-fixes-${PATCH_NUM2}.patch154 echo "Created ~/patches/gcc-${VERSION}-fixes-${PATCH_NUM2}.patch."155 129 fi 156 130 157 131 # Cleanup Directory 158 132 # 159 cd ~/tmp 160 rm -rf gcc-${VERSION} gcc-${VERSION}.orig 133 134 for dir in $(find * -type d); do 135 cd /usr/src/gcc-${VERSION}/${dir} 136 for file in $(find . -name '*~'); do 137 rm -f ${file} 138 done 139 for file in $(find . -name '*.orig'); do 140 rm -f ${file} 141 done 142 for file in $(find . -name '*.rej'); do 143 rm -f ${file} 144 done 145 done 146 cd /usr/src/gcc-${VERSION}/ 147 rm -rf *.orig *~ *.rej 148 149 # Create Patch 150 # 151 cd /usr/src 152 echo "Submitted By: Jim Gifford (jim at cross-lfs dot org)" > gcc-${VERSION}-fixes-${PATCH_NUM2}.patch 153 echo "Date: `date +%m-%d-%Y`" >> gcc-${VERSION}-fixes-${PATCH_NUM2}.patch 154 echo "Initial Package Version: ${VERSION}" >> gcc-${VERSION}-fixes-${PATCH_NUM2}.patch 155 echo "Origin: Upstream" >> gcc-${VERSION}-fixes-${PATCH_NUM2}.patch 156 echo "Upstream Status: Applied" >> gcc-${VERSION}-fixes-${PATCH_NUM2}.patch 157 echo "Description: This Patch contains fixes for gcc-${VERSION}, and should be" >> gcc-${VERSION}-fixes-${PATCH_NUM2}.patch 158 echo " rechecked periodically." >> gcc-${VERSION}-fixes-${PATCH_NUM2}.patch 159 echo "" >> gcc-${VERSION}-fixes-${PATCH_NUM2}.patch 160 diff -Naur gcc-${VERSION}.orig gcc-${VERSION} >> gcc-${VERSION}-fixes-${PATCH_NUM2}.patch 161 echo "Created /usr/src/gcc-${VERSION}-fixes-${PATCH_NUM2}.patch."
Note:
See TracChangeset
for help on using the changeset viewer.