- # revno => VERSION hint by Caleb Maclennan <caleb#alerque.com>
- wget -q -O VERSION.sh http://src.chromium.org/viewvc/chrome/trunk/src/chrome/VERSION?revision=$rev
- if grep -Ev '^(MAJOR|MINOR|BUILD|PATCH)=[0-9]+$' VERSION.sh >&2; then
- echo >&2 "I refuse to execute garbled file for security concerns"
- exit 1
+ if [ -z "$version" ]; then
+ wget -q -O VERSION.sh http://src.chromium.org/viewvc/chrome/trunk/src/chrome/VERSION?revision=$rev
+ echo REV=$rev >> VERSION.sh
+ if grep -Ev '^(MAJOR|MINOR|BUILD|PATCH|REV)=[0-9]+$' VERSION.sh >&2; then
+ echo >&2 "I refuse to execute garbled file due security concerns"
+ exit 1
+ fi
+ . ./VERSION.sh
+ version=$MAJOR.$MINOR.$BUILD.$PATCH