summaryrefslogtreecommitdiff
path: root/packaging/bin/update-pkginfo
blob: bcd383e43406ae9f282a9c2128d11c14ba503357 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash

VERSION=$1
RELEASE=$2
REVISION=$3

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 `du -a | awk '{print $2}' | grep \.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/.${REVISION}/g < $f > $f2
done