Improve grep in case 2 projects with similar name 06/4106/1
authorThanh Ha <thanh.ha@linuxfoundation.org>
Thu, 3 Dec 2015 22:16:01 +0000 (17:16 -0500)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Fri, 3 Feb 2017 17:04:39 +0000 (12:04 -0500)
For example "snmp" will return both snmp and snmp4sdn. This patch makes
it clear we only want the result of snmp only.

Change-Id: I2224cb5bdbe3f4a976d095e9a7b696a8b9e2008a
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
(cherry picked from commit bb0d68fb970a101660b9027af2b383ea29068571)

patch-odl-release.sh

index fd351d9..f111566 100755 (executable)
@@ -39,7 +39,7 @@ scriptdir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
 # built the release. Basically ensuring that no new patches snuck into the
 # project during code freeze.
 CURRENT_HASH=`git rev-parse HEAD`
-EXPECTED_HASH=`grep $project $PATCH_DIR/taglist.log | awk '{ print $2 }'`
+EXPECTED_HASH=`grep "$project[[:space:]]" $PATCH_DIR/taglist.log | awk '{ print $2 }'`
 echo "Current Hash: $CURRENT_HASH"
 echo "Expected Hash: $EXPECTED_HASH"
 if [ "$CURRENT_HASH" != "$EXPECTED_HASH" ]