source: scripts/patch/gcc-patch.sh@ ef18c05

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

Changed email address

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