mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-19 09:16:29 +00:00
Add one script to get patches prefixed by the term of number
Signed-off-by: Tiejun Chen <tiejun.china@gmail.com>
This commit is contained in:
parent
5525c4858c
commit
2cffa7b455
22
scripts/prefix-with-number.sh
Executable file
22
scripts/prefix-with-number.sh
Executable 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;
|
Loading…
Reference in New Issue
Block a user