forked from extern/shorewall_code
Reduce number of loops in setversion
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@7904 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
91dfcf32b1
commit
a967ff2946
@ -18,19 +18,13 @@ case $VERSION in
|
||||
esac
|
||||
|
||||
for product in common lite shell perl; do
|
||||
file=Shorewall-${product}${SUFFIX}/install.sh
|
||||
[ -f $file ] && eval perl -p -i -e "'s/VERSION=.*/VERSION=${VERSION}/'" $file
|
||||
done
|
||||
|
||||
for product in common lite; do
|
||||
dir=Shorewall-${product}${SUFFIX}
|
||||
for file in $dir/uninstall.sh $dir/fallback.sh; do
|
||||
|
||||
for file in $dir/install.sh $dir/uninstall.sh $dir/fallback.sh; do
|
||||
[ -f $file ] && eval perl -p -i -e "'s/^VERSION=.*/VERSION=${VERSION}/'" $file
|
||||
done
|
||||
done
|
||||
|
||||
for product in common lite shell perl; do
|
||||
file=Shorewall-${product}${SUFFIX}/shorewall-${product}.spec
|
||||
file=$dir/shorewall-${product}.spec
|
||||
[ -f $file ] && eval perl -n -i -e "'s/^%define version .*/%define version ${RPMVERSION}/; \
|
||||
s/^%define release .*/%define release ${RELEASE}/; \
|
||||
print \$_; \
|
||||
|
Loading…
Reference in New Issue
Block a user