source: clfs-embedded/scripts/patch/uclibc-patches.sh@ e8502cf

Last change on this file since e8502cf was f5994ee, checked in by Jim Gifford <clfs@…>, 16 years ago

uClibc Updates and Linux Update

  • Property mode set to 100755
File size: 2.2 KB
Line 
1#!/bin/bash
2# Create a uClibc Patch
3
4# Get Version #
5#
6VERSION=$1
7SOURCEVERSION=$2
8
9# Check Input
10#
11if [ "${VERSION}" = "" -o "${SOURCEVERSION}" = "" ]; then
12 echo "$0 - uClibc_Version"
13 echo "This will Create a Patch for uClibc uClibc_Series uClibc_Version"
14 echo "Example $0 0.9.30 0.9.30.1"
15 exit 255
16fi
17
18# Download uClibc Source
19#
20cd /usr/src
21if ! [ -e uClibc-${SOURCEVERSION}.tar.bz2 ]; then
22 wget http://www.uclibc.org/downloads/uClibc-${SOURCEVERSION}.tar.bz2
23fi
24
25# Set Patch Number
26#
27cd /usr/src
28wget http://svn.cross-lfs.org/svn/repos/cross-lfs/branches/clfs-embedded/patches/ --no-remove-listing
29PATCH_NUM=$(cat index.html | grep uClibc | grep "${SOURCEVERSION}" | grep branch_update | cut -f2 -d'"' | cut -f1 -d'"'| cut -f4 -d- | cut -f1 -d. | tail -n 1)
30PATCH_NUM=$(expr ${PATCH_NUM} + 1)
31rm -f index.html
32
33# Cleanup Directory
34#
35rm -rf uClibc-${SOURCEVERSION} uClibc-${SOURCEVERSION}.orig
36tar xvf uClibc-${SOURCEVERSION}.tar.bz2
37mv uClibc-${SOURCEVERSION} uClibc-${SOURCEVERSION}.orig
38CURRENTDIR=$(pwd -P)
39
40# Get Current Updates from SVN
41#
42cd /usr/src
43FIXEDVERSION=$(echo ${VERSION} | sed -e 's/\./_/g')
44svn export svn://uclibc.org/branches/uClibc_${FIXEDVERSION} uClibc-${SOURCEVERSION}
45
46# Create Patch
47#
48cd /usr/src
49echo "Submitted By: Jim Gifford (jim at cross-lfs dot org)" > uClibc-${SOURCEVERSION}-branch_update-${PATCH_NUM}.patch
50echo "Date: `date +%m-%d-%Y`" >> uClibc-${SOURCEVERSION}-branch_update-${PATCH_NUM}.patch
51echo "Initial Package Version: ${SOURCEVERSION}" >> uClibc-${SOURCEVERSION}-branch_update-${PATCH_NUM}.patch
52echo "Origin: Upstream" >> uClibc-${SOURCEVERSION}-branch_update-${PATCH_NUM}.patch
53echo "Upstream Status: Applied" >> uClibc-${SOURCEVERSION}-branch_update-${PATCH_NUM}.patch
54echo "Description: This is a branch update for uClibc-${SOURCEVERSION}, and should be" >> uClibc-${SOURCEVERSION}-branch_update-${PATCH_NUM}.patch
55echo " rechecked periodically." >> uClibc-${SOURCEVERSION}-branch_update-${PATCH_NUM}.patch
56echo "" >> uClibc-${SOURCEVERSION}-branch_update-${PATCH_NUM}.patch
57diff -Naur uClibc-${SOURCEVERSION}.orig uClibc-${SOURCEVERSION} >> uClibc-${SOURCEVERSION}-branch_update-${PATCH_NUM}.patch
58echo "Created /usr/src/uClibc-${SOURCEVERSION}-branch_update-${PATCH_NUM}.patch."
Note: See TracBrowser for help on using the repository browser.