##// END OF EJS Templates
contrib/buildrpm: Don't use perl
Mads Kiilerich -
r8868:8c971155 default
parent child Browse files
Show More
@@ -37,10 +37,10 b' fi'
37
37
38 tmpspec=/tmp/`basename "$specfile"`.$$ # FIXME: Insecure /tmp handling
38 tmpspec=/tmp/`basename "$specfile"`.$$ # FIXME: Insecure /tmp handling
39 # Use the most recent tag as the version.
39 # Use the most recent tag as the version.
40 version=`hg tags | perl -e 'while(<STDIN>){if(/^(\d\S+)/){print$1;exit}}'`
40 version=`hg tags | python -c 'import sys; print [l for l in sys.stdin.readlines() if l[0].isdigit()][0].split()[0]'`
41 # Compute the release number as the difference in revision numbers
41 # Compute the release number as the difference in revision numbers
42 # between the tip and the most recent tag.
42 # between the tip and the most recent tag.
43 release=`hg tags | perl -e 'while(<STDIN>){($tag,$id)=/^(\S+)\s+(\d+)/;if($tag eq "tip"){$tip = $id}elsif($tag=~/^\d/){print $tip-$id+1;exit}}'`
43 release=`hg tags | python -c 'import sys; l = sys.stdin.readlines(); print int(l[0].split()[1].split(":")[0]) - int([x for x in l if x[0].isdigit()][0].split()[1].split(":")[0])'`
44 tip=`hg -q tip`
44 tip=`hg -q tip`
45
45
46 # Beat up the spec file
46 # Beat up the spec file
General Comments 0
You need to be logged in to leave comments. Login now