scripts: Rename the script to rename the rt patches

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
This commit is contained in:
Rolf Neugebauer
2018-03-15 10:59:05 +00:00
parent 0c8022c173
commit bc35b3c1c9

22
scripts/rt-patches-rename.sh Executable file
View File

@@ -0,0 +1,22 @@
#!/bin/bash
# This can help get patches prefixed by the term of number.
#
# Just please list all patches in the file "series" orderly, and then run this
# script directly.
#
# $ cat series
# $ xxxx.patch
# $ yyyy.patch
# $ zzzz.patch
# $ ./prefix-with-number.sh
# $ ls -l
# 0001-xxxx.patch
# 0002-yyyy.patch
# 0003-zzzz.patch
#
i=0000
for line in `sed -e "s/#.*//g" series`; do
i=$(expr $i + 1)
a=$((10000+$i))
mv $line ${a:1}-$line
done;