summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2008-12-15 18:09:22 (GMT)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2008-12-15 18:09:22 (GMT)
commit59090df851f0d50231ad90ba9b3cd79d4b88f072 (patch)
tree8ae8e95ac6e87f53d3feb0ee6b0c16a56ee9abfe /tools
parent4cfd308098db9eccc48a2cb47c769ec4bcc65d9d (diff)
Move patch-renumber.sh from tools/ to scripts/
Diffstat (limited to 'tools')
-rwxr-xr-xtools/patch-renumber.sh32
1 files changed, 0 insertions, 32 deletions
diff --git a/tools/patch-renumber.sh b/tools/patch-renumber.sh
deleted file mode 100755
index f46c064..0000000
--- a/tools/patch-renumber.sh
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/bin/sh
-# Yes, this intends to be a true POSIX script file.
-
-myname="$0"
-
-doUsage() {
- cat <<_EOF_
-Usage: ${myname} <dir> <base> <inc>
- Will renumber all patches found in <dir>, starting at <base>, and with
- an increment of <inc>
- Eg.: patch-renumber patches/gcc/4.3.1 100 10
-_EOF_
-}
-
-[ $# -eq 3 ] || { doUsage; exit 1; }
-[ -d "${1}" ] || { doUsage; exit 1; }
-
-dir="${1}"
-cpt="${2}"
-inc="${3}"
-
-case $(LC_ALL=C svnversion 2>/dev/null) in
- exported) CMD="mv -v";;
- *) CMD="svn mv";;
-esac
-
-for p in "${dir}"/*.patch; do
- [ -e "${p}" ] || { echo "No such file '${p}'"; exit 1; }
- newname="$(printf "%03d" ${cpt})-$(basename "${p}" |sed -r -e 's/^[[:digit:]]{3}-//')"
- [ "${p}" = "${dir}/${newname}" ] || ${CMD} "${p}" "${dir}/${newname}"
- cpt=$((cpt+inc))
-done