source: scripts/patch/perl-patch.sh@ 649028b

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

Update Perl Branch Script

  • Property mode set to 100755
File size: 1.9 KB
RevLine 
[9676bac]1#!/bin/bash
2# Create a Perl Patch
3
4# Get Version #
5#
6VERSION=$1
7
8# Check Input
9#
10if [ "${VERSION}" = "" ]; then
11 echo "$0 - Perl_Version"
12 echo "This will Create a Patch for Perl Perl_Version"
13 exit 255
14fi
15
16# Download Perl Source
17#
18cd /usr/src
19if ! [ -e perl-${VERSION}.tar.gz ]; then
20 wget http://www.cpan.org/src/perl-${VERSION}.tar.gz
21fi
22
23# Cleanup Directory
24#
25rm -rf perl-${VERSION} perl-${VERSION}.orig
26tar xvf perl-${VERSION}.tar.gz
27mv perl-${VERSION} perl-${VERSION}.orig
28CURRENTDIR=$(pwd -P)
29
30# Get Current Updates from CVS
31#
32cd /usr/src
33FIXEDVERSION=$(echo ${VERSION} | sed -e 's ..$ ')
[550b73d]34rsync -avz rsync://perl5.git.perl.org/APC/perl-${FIXEDVERSION}.x tmp
35cd tmp
36mv perl-${FIXEDVERSION}.x /usr/src/perl-${VERSION}
[9676bac]37
38# Cleanup
39#
[550b73d]40cd /usr/src/perl-${VERSION}
41REMOVE=".patch AUTHORS Changes*"
42for file in $REMOVE; do
43 cd /usr/src/perl-${VERSION}
44 rm -f ${file}
45 cd /usr/src/perl-${VERSION}.orig
46 rm -f ${file}
[9676bac]47done
[550b73d]48cd ..
[9676bac]49
[550b73d]50# Remove Directories
[9676bac]51#
[550b73d]52cd /usr/src/perl-${VERSION}
53REMOVE="os2 vms win32"
54for dir in $REMOVE; do
[9676bac]55 cd /usr/src/perl-${VERSION}
[550b73d]56 rm -rf ${dir}
57 cd /usr/src/perl-${VERSION}.orig
58 rm -rf ${dir}
[9676bac]59done
[550b73d]60cd ..
[9676bac]61
62# Create Patch
63#
64cd /usr/src
65echo "Submitted By: Jim Gifford (jim at cross-lfs dot org)" > perl-${VERSION}-branch_update-x.patch
66echo "Date: `date +%m-%d-%Y`" >> perl-${VERSION}-branch_update-x.patch
67echo "Initial Package Version: ${VERSION}" >> perl-${VERSION}-branch_update-x.patch
68echo "Origin: Upstream" >> perl-${VERSION}-branch_update-x.patch
69echo "Upstream Status: Applied" >> perl-${VERSION}-branch_update-x.patch
70echo "Description: This is a branch update for perl-${VERSION}, and should be" >> perl-${VERSION}-branch_update-x.patch
71echo " rechecked periodically." >> perl-${VERSION}-branch_update-x.patch
72echo "" >> perl-${VERSION}-branch_update-x.patch
73diff -Naur perl-${VERSION}.orig perl-${VERSION} >> perl-${VERSION}-branch_update-x.patch
74echo "Created /usr/src/perl-${VERSION}-branch_update-x.patch."
Note: See TracBrowser for help on using the repository browser.