packaging: remove commented out stuff from update-pkginfo
[ira/wip.git] / packaging / bin / update-pkginfo
1 #!/bin/bash
2
3 VERSION=$1
4 RELEASE=$2
5 REVISION=$3
6
7 if [ "x${REVISION}" = "x" ]; then
8         RPMREVISION=""
9 else
10         RPMREVISION=".${REVISION}"
11 fi
12
13 if [ $# -ne 3 ]; then
14     echo Usage: update-pkginfo VERSION RELEASE REVISION
15     exit 1
16 fi
17
18 for f in `find . -type f -name "*.tmpl"`; do
19         f2=`echo $f | sed s/.tmpl//g`
20         echo $f2
21         sed -e s/PVERSION/$VERSION/g \
22                 -e s/PRELEASE/$RELEASE/g \
23                 -e s/PREVISION/${REVISION}/g \
24                 -e s/PRPMREV/${RPMREVISION}/g < $f > $f2
25 done
26