forked from extern/shorewall_code
8ae77e6830
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@7897 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
25 lines
947 B
Bash
Executable File
25 lines
947 B
Bash
Executable File
#!/bin/sh
|
|
|
|
[ $# -eq 1 ] || { echo "usage: setversion <version>" >&2; exit 1; }
|
|
|
|
for product in common lite shell perl; do
|
|
eval perl -p -i -e "'s/VERSION=.*/VERSION=$1/'" Shorewall-${product}/install.sh
|
|
done
|
|
|
|
for product in common lite; do
|
|
eval perl -p -i -e "'s/^VERSION=.*/VERSION=$1/'" Shorewall-${product}/uninstall.sh Shorewall-${product}/fallback.sh
|
|
done
|
|
|
|
for product in common lite shell perl; do
|
|
eval perl -n -i -e "'s/^%define version .*/%device version $1/; \
|
|
print \$_; \
|
|
if ( /%changelog/ ) {\
|
|
print \"\* $(date +'%a %b %d %Y') Tom Eastep tom\\@shorewall.net\\n\"; \
|
|
print \"- Updated to $1\\n\"; \
|
|
}'" Shorewall-${product}/shorewall-${product}.spec
|
|
done
|
|
|
|
eval perl -p -i -e "'s/^(\s+)VERSION => .*/\$1VERSION => \"$1\",/'" Shorewall-perl/Shorewall/Config.pm
|
|
|
|
|