diff options
Diffstat (limited to 'packaging/bin/update-pkginfo')
-rwxr-xr-x | packaging/bin/update-pkginfo | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/packaging/bin/update-pkginfo b/packaging/bin/update-pkginfo new file mode 100755 index 0000000000..9d8006aa58 --- /dev/null +++ b/packaging/bin/update-pkginfo @@ -0,0 +1,28 @@ +#!/bin/bash + +VERSION=$1 +RELEASE=$2 +REVISION=$3 + +if [ "x${REVISION}" = "x" ]; then + RPMREVISION="" +else + RPMREVISION=".${REVISION}" +fi + +if [ $# -ne 3 ]; then + echo Usage: update-pkginfo VERSION RELEASE REVISION + exit 1 +fi +# PREV=`echo ${REVISION} | sed 's/[^0-9]//g'` +# PREV="."`echo ${REVISION} | sed 's/[0-9]//g'`".${PREV}" + +for f in `find . -type f -name "*.tmpl"`; do + f2=`echo $f | sed s/.tmpl//g` + echo $f2 + sed -e s/PVERSION/$VERSION/g \ + -e s/PRELEASE/$RELEASE/g \ + -e s/PREVISION/${REVISION}/g \ + -e s/PRPMREV/${RPMREVISION}/g < $f > $f2 +done + |