Skip to content

Commit 178a4bb

Browse files
committed
Restore validation of version arg
1 parent d39f9f6 commit 178a4bb

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

bootstrap-osg-test

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,19 @@ on_error_die()
1313
fi
1414
}
1515

16-
if [ $# -ne 1 ]; then
17-
echo "Usage: $0 <OSG RELEASE>"
16+
if [ $# -lt 1 ]; then
17+
echo "Requires the major version number, i.e. 3.2 for 3.2.0"
18+
echo "usage: $0 <major version> [testing|development]"
1819
exit 1
1920
fi
2021

21-
version=$1
22+
if [[ $1 =~ ^[0-9]+\.[0-9]+$ ]]; then
23+
version=$1
24+
else
25+
echo "Major version should be in the form of '<number>.<number>, i.e. 3.2"
26+
echo "usage: $0 <major version> [testing|development]"
27+
exit 1
28+
fi
2229

2330
# Determine platform-specific details
2431
release=`cat /etc/redhat-release`

0 commit comments

Comments
 (0)