Skip to content

Commit 328b654

Browse files
committed
snapshot: fix hash comparison
- Don't use "-i" CLI option to perl; it's unnecessary here and causes a warning - Branch names may not be entirely letters (e.g., "v1.11"), so take any character in the regexp to match the branch name Signed-off-by: Jeff Squyres <[email protected]>
1 parent cfce565 commit 328b654

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

contrib/nightly/create_tarball.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# University of Stuttgart. All rights reserved.
1111
# Copyright (c) 2004-2005 The Regents of the University of California.
1212
# All rights reserved.
13-
# Copyright (c) 2006-2016 Cisco Systems, Inc. All rights reserved.
13+
# Copyright (c) 2006-2017 Cisco Systems, Inc. All rights reserved.
1414
# $COPYRIGHT$
1515
#
1616
# Additional copyrights may follow
@@ -195,7 +195,7 @@ if test -f "$destdir/latest_snapshot.txt"; then
195195
# Snip the timestamp out of the versions and compare just
196196
# ${BRANCHNAME}-${SHORTHASH}.
197197
compare_version="$gitbranch-$githash"
198-
compare_snapshot_version=`echo $snapshot_version | perl -pi -e 's/^([a-z]+)-(\d+)-(.*+)$/$1-$3/'`
198+
compare_snapshot_version=`echo $snapshot_version | perl -p -e 's/^(.+?)-(\d+)-(.*+)$/$1-$3/'`
199199
if test "$compare_version" = "$compare_snapshot_version"; then
200200
if test -n "$debug"; then
201201
echo "*** Our branch/git hash is the same as the last snapshot -- not doing anything"

0 commit comments

Comments
 (0)