From 1529586f21f1130f087cb53f2c5c9455bc891956 Mon Sep 17 00:00:00 2001
From: Russell Bryant <russell@russellbryant.com>
Date: Sat, 17 Nov 2007 06:07:57 +0000
Subject: [PATCH] Use the fix suggested by Tilghman on the -dev to make cutting
 up the BUILDSUM friendly to non-bash shells.  I think this should work for
 BSD/mingw as well, but did not yet remove the switch statement.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89359 65c4cc65-6c06-0410-ace0-fbb531ad65f3
---
 build_tools/make_buildopts_h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/build_tools/make_buildopts_h b/build_tools/make_buildopts_h
index 87271ec49b..67c42c122d 100755
--- a/build_tools/make_buildopts_h
+++ b/build_tools/make_buildopts_h
@@ -29,6 +29,6 @@ case ${OSARCH} in	# actually we should check build_os
 	;;
 *)
 	BUILDSUM=`echo ${TMP} | md5sum`
-	echo "#define AST_BUILDOPT_SUM {0x${BUILDSUM:0:8}, 0x${BUILDSUM:8:8}, 0x${BUILDSUM:16:8}, 0x${BUILDSUM:24:8}}"
+	echo "#define AST_BUILDOPT_SUM { `echo -n ${BUILDSUM} | cut -c1-8`, `echo -n ${BUILDSUM} | cut -c9-16`, `echo -n ${BUILDSUM} | cut -c17-24`, `echo -n ${BUILDSUM} | cut -c25-32` }"
 	;;
 esac
-- 
GitLab