summaryrefslogtreecommitdiffstats
path: root/scripts/lib/ptxd_make_world_patchin.sh
diff options
context:
space:
mode:
authorMarc Kleine-Budde <mkl@pengutronix.de>2015-06-11 15:23:41 +0200
committerMarc Kleine-Budde <mkl@pengutronix.de>2015-06-11 15:25:02 +0200
commit1f6f452495a9d6e18f73fd6630e775d1dfa26e57 (patch)
tree49fb22263bcc7dbea3476ce6918ba0ea562a9d2b /scripts/lib/ptxd_make_world_patchin.sh
parenta99f0b94d40269c6ae716b46c78ebc458234c30f (diff)
downloadptxdist-1f6f452495a9d6e18f73fd6630e775d1dfa26e57.tar.gz
ptxdist-1f6f452495a9d6e18f73fd6630e775d1dfa26e57.tar.xz
ptxd_make_world_patchin: remove leading 0 from patch number
...otherweise bash would interprete the number as octal. This fails if the patch number contains a figure >= 8. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'scripts/lib/ptxd_make_world_patchin.sh')
-rw-r--r--scripts/lib/ptxd_make_world_patchin.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/lib/ptxd_make_world_patchin.sh b/scripts/lib/ptxd_make_world_patchin.sh
index 2f22fe573..170237ff9 100644
--- a/scripts/lib/ptxd_make_world_patchin.sh
+++ b/scripts/lib/ptxd_make_world_patchin.sh
@@ -157,7 +157,7 @@ ptxd_make_world_patchin_apply_git()
# skip patches generated by other tools with '# <tool>-end' as end marker
if tail -n1 "${pkg_patchin_dir}/.ptxdist/series" | grep -q '# [^ ]*-end$'; then
- local last="$(sed -n 's/^\([0-9][0-9]*\)-.*/\1/p' "${pkg_patchin_dir}/.ptxdist/series" | tail -n1)"
+ local last="$(sed -n 's/^0*\([1-9][0-9]*\)-.*/\1/p' "${pkg_patchin_dir}/.ptxdist/series" | tail -n1)"
git tag -f base
local next=1000
if [ -n "${last}" ]; then