fix: awk script failed
authorIceyer <me@iceyer.net>
Tue, 16 Jan 2018 01:38:03 +0000 (09:38 +0800)
committerIceyer <me@iceyer.net>
Tue, 16 Jan 2018 01:52:59 +0000 (09:52 +0800)
Change-Id: Ib5e731eb6a87b75c1e88c75065502ea175f734e5

debian/rules

index 309449c7f3f1fe86484d9b6d1ce43a2aa37d6794..fc10b2f29c580afa28ab69b4b10e49efe19cf3d1 100755 (executable)
@@ -9,7 +9,7 @@ export _VER=$(shell if [ ! -f .git/config ];then dpkg-parsechangelog -ldebian/ch
 export _MAJ_VER=$(shell echo $$_VER|awk '{split($$0,vs,"."); if (length(vs[1]) == 0) print 0; else  print int(vs[1]);}')
 export _MIN_VER=$(shell echo $$_VER|awk '{split($$0,vs,"."); if (length(vs[2]) == 0) print 0; else  print int(vs[2]);}')
 export _PAT_VER=$(shell echo $$_VER|awk '{split($$0,vs,"."); if (length(vs[3]) == 0) print 0; else  print int(vs[3]);}')
-export _BUILD_VER=$(shell echo $$_VER|awk '{split($$0,vs,"."); if (length(vs[4]) != 0) print vs[4]; else { split(vs[3], pvs,"+r"); if (length(pvs[2]) != 0) print int(pvs[2]); else print 0;}}')
+export _BUILD_VER=$(shell echo $$_VER|awk '{split($$0,vs,"."); if (length(vs[4]) != 0) print vs[4]; else { split(vs[3], pvs,/\+r/); if (length(pvs[2]) != 0) print int(pvs[2]); else print 0;}}')
 VERSION ?= $(shell echo $$_VER|awk '{ if (length($$0)!=0) printf "%s.%s.%s.%s",${_MAJ_VER},${_MIN_VER},${_PAT_VER},${_BUILD_VER}; else printf ""; }')
 
 %: