Mercurial > hg > CbC > CbC_llvm
comparison lldb/scripts/framework-header-fix.sh @ 150:1d019706d866
LLVM10
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 15:10:13 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
147:c2174574ed3a | 150:1d019706d866 |
---|---|
1 #!/bin/sh | |
2 # Usage: framework-header-fix.sh <source header dir> <LLDB Version> | |
3 | |
4 set -e | |
5 | |
6 for file in `find $1 -name "*.h"` | |
7 do | |
8 /usr/bin/sed -i.bak 's/\(#include\)[ ]*"lldb\/\(API\/\)\{0,1\}\(.*\)"/\1 <LLDB\/\3>/1' "$file" | |
9 /usr/bin/sed -i.bak 's|<LLDB/Utility|<LLDB|' "$file" | |
10 LLDB_VERSION=`echo $2 | /usr/bin/sed -E 's/^([0-9]+).([0-9]+).([0-9]+)(.[0-9]+)?$/\\1/g'` | |
11 LLDB_REVISION=`echo $2 | /usr/bin/sed -E 's/^([0-9]+).([0-9]+).([0-9]+)(.[0-9]+)?$/\\3/g'` | |
12 LLDB_VERSION_STRING=`echo $2` | |
13 /usr/bin/sed -i.bak "s|//#define LLDB_VERSION$|#define LLDB_VERSION $LLDB_VERSION |" "$file" | |
14 /usr/bin/sed -i.bak "s|//#define LLDB_REVISION|#define LLDB_REVISION $LLDB_REVISION |" "$file" | |
15 /usr/bin/sed -i.bak "s|//#define LLDB_VERSION_STRING|#define LLDB_VERSION_STRING \"$LLDB_VERSION_STRING\" |" "$file" | |
16 rm -f "$file.bak" | |
17 done |