From: Iceyer Date: Tue, 16 Jan 2018 01:38:03 +0000 (+0800) Subject: fix: awk script failed X-Git-Tag: archive/raspbian/5.7.12-2+rpi1^2~130^2~24 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=524a3fa6021ee54db416503520aea65ef0e2c3a0;p=dtkcore.git fix: awk script failed Change-Id: Ib5e731eb6a87b75c1e88c75065502ea175f734e5 --- diff --git a/debian/rules b/debian/rules index 309449c..fc10b2f 100755 --- a/debian/rules +++ b/debian/rules @@ -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 ""; }') %: