source: scripts/patch/gcc-patch.sh@ 1d2938ee

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 1d2938ee was 0804c00, checked in by Jim Gifford <clfs@…>, 16 years ago

Updated to GCC 4.3.3 - Patches

  • Property mode set to 100755
File size: 2.3 KB
Line 
1#!/bin/bash
2# Create a GCC Patch
3
4# Get Version #
5#
6VERSION=$1
7
8# Check Input
9#
10if [ "${VERSION}" = "" ]; then
11 echo "$0 - GCC_Version"
12 echo "This will Create a Patch for GCC GCC_Version"
13 exit 255
14fi
15
16# Download GCC Source
17#
18cd /usr/src
19if ! [ -e gcc-${VERSION}.tar.bz2 ]; then
20 wget ftp://gcc.gnu.org/pub/gcc/releases/gcc-${VERSION}/gcc-${VERSION}.tar.bz2
21fi
22
23# Cleanup Directory
24#
25rm -rf gcc-${VERSION} gcc-${VERSION}.orig
26tar xvf gcc-${VERSION}.tar.bz2
27mv gcc-${VERSION} gcc-${VERSION}.orig
28CURRENTDIR=$(pwd -P)
29
30# Get Current Updates from SVN
31#
32cd /usr/src
33NUM1=$(echo ${VERSION} | cut -f1 -d.)
34NUM2=$(echo ${VERSION} | cut -f2 -d.)
35FIXEDVERSION=$(echo -n "$NUM1" ; echo -n "_" ; echo -e "$NUM2")
36svn export svn://gcc.gnu.org/svn/gcc/branches/gcc-${FIXEDVERSION}-branch gcc-${VERSION}
37
38# Cleanup
39DIRS="gcc-${VERSION} gcc-${VERSION}.orig"
40for DIRECTORY in ${DIRS}; do
41 cd ${DIRECTORY}
42 REMOVE="ABOUT-NLS COPYING COPYING.LIB ChangeLog ChangeLog.tree-ssa MAINTAINERS Makefile.def
43 Makefile.in Makefile.tpl README README.SCO boehm-gc/ChangeLog BUGS FAQ LAST_UPDATED
44 MD5SUMS NEWS bugs.html faq.html gcc/BASE-VER gcc/DATESTAMP gcc/DEV-PHASE gcc/c-parse.c
45 gcc/gengtype-lex.c gcc/c-parse.y gcc/gengtype-yacc.c gcc/gengtype-yacc.h gcc/f/BUGS gcc/f/NEWS
46 gcc/java/parse-scan.c gcc/java/parse.c gcc/objc/objc-parse.c gcc/objc/objc-parse.y"
47 for file in ${REMOVE}; do
48 rm -f $file
49 done
50 rm -rf INSTALL
51 rm -f fastjar/*.{1,info} gcc/doc/*.{1,info,7} gcc/fortran/*.{1,info,7}
52 rm -f gcc/po/*.{gmo,po} libcpp/po/*.{gmo,po} libgomp/*.{1,info,7}
53 cd ..
54done
55
56# Create Patch
57#
58cd /usr/src
59echo "Submitted By: Jim Gifford (jim at cross-lfs dot org)" > gcc-${VERSION}-branch_update-x.patch
60echo "Date: `date +%m-%d-%Y`" >> gcc-${VERSION}-branch_update-x.patch
61echo "Initial Package Version: ${VERSION}" >> gcc-${VERSION}-branch_update-x.patch
62echo "Origin: Upstream" >> gcc-${VERSION}-branch_update-x.patch
63echo "Upstream Status: Applied" >> gcc-${VERSION}-branch_update-x.patch
64echo "Description: This is a branch update for gcc-${VERSION}, and should be" >> gcc-${VERSION}-branch_update-x.patch
65echo " rechecked periodically." >> gcc-${VERSION}-branch_update-x.patch
66echo "" >> gcc-${VERSION}-branch_update-x.patch
67diff -Naur gcc-${VERSION}.orig gcc-${VERSION} >> gcc-${VERSION}-branch_update-x.patch
68echo "Created /usr/src/gcc-${VERSION}-branch_update-x.patch."
Note: See TracBrowser for help on using the repository browser.