tools/patch-renumber.sh
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sun Oct 12 10:18:35 2008 +0000 (2008-10-12)
changeset 917 33ade2b7e008
permissions -rwxr-xr-x
On 20081011, Khem RAJ writes:
You have to bar gcc trying to build unwinding at stage 1.

/trunk/patches/gcc/4.2.0/290-sh-without-headers.patch | 26 26 0 0 ++++++++++++++++++++++++++
/trunk/patches/gcc/4.2.1/290-sh-without-headers.patch | 26 26 0 0 ++++++++++++++++++++++++++
/trunk/patches/gcc/4.2.2/290-sh-without-headers.patch | 26 26 0 0 ++++++++++++++++++++++++++
/trunk/patches/gcc/4.3.1/350-sh-without-headers.patch | 26 26 0 0 ++++++++++++++++++++++++++
/trunk/patches/gcc/4.2.3/310-sh-without-headers.patch | 26 26 0 0 ++++++++++++++++++++++++++
/trunk/patches/gcc/4.3.2/350-sh-without-headers.patch | 26 26 0 0 ++++++++++++++++++++++++++
/trunk/patches/gcc/4.2.4/310-sh-without-headers.patch | 26 26 0 0 ++++++++++++++++++++++++++
7 files changed, 182 insertions(+)
yann@756
     1
#!/bin/sh
yann@756
     2
# Yes, this intends to be a true POSIX script file.
yann@756
     3
yann@756
     4
myname="$0"
yann@756
     5
yann@756
     6
doUsage() {
yann@756
     7
  cat <<_EOF_
yann@756
     8
Usage: ${myname} <dir> <base> <inc>
yann@756
     9
    Will renumber all patches found in <dir>, starting at <base>, and with
yann@756
    10
    an increment of <inc>
yann@756
    11
    Eg.: patch-renumber patches/gcc/4.3.1 100 10
yann@756
    12
_EOF_
yann@756
    13
}
yann@756
    14
yann@756
    15
[ $# -eq 3 ] || { doUsage; exit 1; }
yann@756
    16
[ -d "${1}" ] || { doUsage; exit 1; }
yann@756
    17
yann@756
    18
dir="${1}"
yann@756
    19
cpt="${2}"
yann@756
    20
inc="${3}"
yann@756
    21
yann@756
    22
case $(LC_ALL=C svnversion 2>/dev/null) in
yann@756
    23
    exported)   CMD="mv -v";;
yann@756
    24
    *)          CMD="svn mv";;
yann@756
    25
esac
yann@756
    26
yann@756
    27
for p in "${dir}"/*.patch; do
yann@756
    28
    [ -e "${p}" ] || { echo "No such file '${p}'"; exit 1; }
yann@756
    29
    newname="$(printf "%03d" ${cpt})-$(basename "${p}" |sed -r -e 's/^[[:digit:]]{3}-//')"
yann@756
    30
    [ "${p}" = "${dir}/${newname}" ] || ${CMD} "${p}" "${dir}/${newname}"
yann@756
    31
    cpt=$((cpt+inc))
yann@756
    32
done