From: Richard Mudgett Date: Fri, 26 Sep 2014 15:51:22 +0000 (+0000) Subject: format_mp3: Made the get script conditionally apply patch if not already there. X-Git-Tag: 14.0.0-beta1~1623 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3c1804eb0db5a450b1319721e8486fa537c85515;p=thirdparty%2Fasterisk.git format_mp3: Made the get script conditionally apply patch if not already there. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@424039 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/contrib/scripts/get_mp3_source.sh b/contrib/scripts/get_mp3_source.sh index e1ee13bbdd..860e2bc02f 100755 --- a/contrib/scripts/get_mp3_source.sh +++ b/contrib/scripts/get_mp3_source.sh @@ -17,8 +17,10 @@ fi svn export http://svn.digium.com/svn/thirdparty/mp3/trunk addons/mp3 $@ -# Manually patch interface.c. -sed -i -e '/#include "asterisk.h"/i#define WRAP_LIBC_MALLOC' \ - addons/mp3/interface.c +# Manually patch interface.c if not done yet. +if ! grep -q WRAP_LIBC_MALLOC addons/mp3/interface.c; then + sed -i -e '/#include "asterisk.h"/i#define WRAP_LIBC_MALLOC' \ + addons/mp3/interface.c +fi exit 0