[U-Boot-Users] [PATCH] Add brackets to if condition in tools/setlocalversion

Tsi-Chung Liew Tsi-Chung.Liew at freescale.com
Fri Mar 21 00:49:38 CET 2008


The long condition in the script causes all ColdFire platforms
unable to compile correctly. By adding square brackets, all
compile without error.

Signed-off-by: TsiChung Liew <Tsi-Chung.Liew at freescale.com>
---
 tools/setlocalversion |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/setlocalversion b/tools/setlocalversion
index 9bbdafd..2c27291 100755
--- a/tools/setlocalversion
+++ b/tools/setlocalversion
@@ -11,8 +11,8 @@ cd "${1:-.}" || usage
 # Check for git and a git repo.
 if head=`git rev-parse --verify HEAD 2>/dev/null`; then
 	# Do we have an untagged version?
-	if git name-rev --tags HEAD | \
-	   grep -E '^HEAD[[:space:]]+(.*~[0-9]*|undefined)$' > /dev/null; then
+	if [git name-rev --tags HEAD | \
+	   grep -E '^HEAD[[:space:]]+(.*~[0-9]*|undefined)$' > /dev/null]; then
 	        git describe | awk -F- '{printf("-%05d-%s", $(NF-1),$(NF))}'
 	fi
 
-- 
1.5.4.1





More information about the U-Boot mailing list