diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-12-18 20:12:36 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-12-18 20:12:36 +0000 |
commit | ef5d0b5e97ec8e6fa395d377b09aa7755e345b4f (patch) | |
tree | 27916256fdeeb57d10d2f3d6948be5d71a703215 /scripts/framework-header-fix.sh | |
parent | 76e0736e7fcfeb179779e49c05604464b1ccd704 (diff) |
Notes
Diffstat (limited to 'scripts/framework-header-fix.sh')
-rwxr-xr-x | scripts/framework-header-fix.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/scripts/framework-header-fix.sh b/scripts/framework-header-fix.sh new file mode 100755 index 000000000000..c09d1458ff82 --- /dev/null +++ b/scripts/framework-header-fix.sh @@ -0,0 +1,13 @@ +#!/bin/sh +# Usage: framework-header-fix.sh <source header dir> <LLDB Version> +for file in `find $1 -name "*.h"` +do + sed -i '' 's/\(#include\)[ ]*"lldb\/\(API\/\)\{0,1\}\(.*\)"/\1 <LLDB\/\3>/1' "$file" + sed -i '' 's|<LLDB/Utility|<LLDB|' "$file" + LLDB_VERSION=`echo $2 | /usr/bin/sed -E 's/^([0-9]+).([0-9]+).([0-9]+)(.[0-9]+)?$/\\1/g'` + LLDB_REVISION=`echo $2 | /usr/bin/sed -E 's/^([0-9]+).([0-9]+).([0-9]+)(.[0-9]+)?$/\\3/g'` + LLDB_VERSION_STRING=`echo $2` + sed -i '' "s|//#define LLDB_VERSION$|#define LLDB_VERSION $LLDB_VERSION |" "$file" + sed -i '' "s|//#define LLDB_REVISION|#define LLDB_REVISION $LLDB_REVISION |" "$file" + sed -i '' "s|//#define LLDB_VERSION_STRING|#define LLDB_VERSION_STRING \"$LLDB_VERSION_STRING\" |" "$file" +done |