source: scripts/patch/binutils-patch.sh@ 5c7a2eb

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

Shortened execution time on binutils branch_update patch creater

  • Property mode set to 100755
File size: 2.4 KB
Line 
1#!/bin/bash
2# Create a Binutils Patch
3
4# Get Version #
5#
6VERSION=$1
7
8# Check Input
9#
10if [ "${VERSION}" = "" ]; then
11 echo "$0 - Binutils_Version"
12 echo "This will Create a Patch for Binutils Binutils_Version"
13 exit 255
14fi
15
16# Download Binutils Source
17#
18cd /usr/src
19if ! [ -e binutils-${VERSION}.tar.bz2 ]; then
20 wget ftp://ftp.gnu.org/gnu/binutils/binutils-${VERSION}.tar.bz2
21fi
22
23# Cleanup Directory
24#
25rm -rf binutils-${VERSION} binutils-${VERSION}.orig
26tar xvf binutils-${VERSION}.tar.bz2
27mv binutils-${VERSION} binutils-${VERSION}.orig
28CURRENTDIR=$(pwd -P)
29
30# Get Current Updates from CVS
31#
32cd /usr/src
33FIXEDVERSION=$(echo ${VERSION} | sed -e 's/\./_/g')
34cvs -z 9 -d :pserver:anoncvs@sourceware.org:/cvs/src export -rbinutils-${FIXEDVERSION}-branch binutils
35mv src binutils-${VERSION}
36
37# Cleanup
38#
39DIRS="binutils-${VERSION} binutils-${VERSION}.orig"
40for DIRECTORY in ${DIRS}; do
41 cd /usr/src/${DIRECTORY}
42 FILE_LIST=".cvsignore *.gmo"
43 for files in ${FILE_LIST}; do
44 REMOVE=$(find * -name ${files})
45 for file in $REMOVE; do
46 rm -f ${file}
47 done
48 done
49
50 REMOVE=".cvsignore MAINTAINERS COPYING.LIBGLOSS COPYING.NEWLIB README-maintainer-mode depcomp
51 ChangeLog compile ltgcc.m4 lt~obsolete.m4 etc/ChangeLog etc/add-log.el etc/add-log.vi"
52 for file in $REMOVE; do
53 rm -f ${file}
54 done
55 cd ..
56done
57cd /usr/src/binutils-${VERSION}
58rm -f /usr/src/binutils-${VERSION}.orig/md5.sum
59
60# Make Binutils a Release
61#
62cd /usr/src/binutils-${VERSION}
63sed -i 's/# RELEASE=y/RELEASE=y/g' bfd/Makefile.am
64sed -i 's/# RELEASE=y/RELEASE=y/g' bfd/Makefile.in
65
66# Create Patch
67#
68cd /usr/src
69echo "Submitted By: Jim Gifford (jim at cross-lfs dot org)" > binutils-${VERSION}-branch_update-x.patch
70echo "Date: `date +%m-%d-%Y`" >> binutils-${VERSION}-branch_update-x.patch
71echo "Initial Package Version: ${VERSION}" >> binutils-${VERSION}-branch_update-x.patch
72echo "Origin: Upstream" >> binutils-${VERSION}-branch_update-x.patch
73echo "Upstream Status: Applied" >> binutils-${VERSION}-branch_update-x.patch
74echo "Description: This is a branch update for binutils-${VERSION}, and should be" >> binutils-${VERSION}-branch_update-x.patch
75echo " rechecked periodically." >> binutils-${VERSION}-branch_update-x.patch
76echo "" >> binutils-${VERSION}-branch_update-x.patch
77diff -Naur binutils-${VERSION}.orig binutils-${VERSION} >> binutils-${VERSION}-branch_update-x.patch
78echo "Created /usr/src/binutils-${VERSION}-branch_update-x.patch."
Note: See TracBrowser for help on using the repository browser.