[PATCH] D49776: Update framework-header-fix to force system sed
Dave Lee via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 4 07:59:51 PST 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL346099: Update framework-header-fix to force system sed (authored by kastiglione, committed by ).
Herald added a subscriber: llvm-commits.
Changed prior to commit:
https://reviews.llvm.org/D49776?vs=157194&id=172523#toc
Repository:
rL LLVM
https://reviews.llvm.org/D49776
Files:
lldb/trunk/scripts/framework-header-fix.sh
Index: lldb/trunk/scripts/framework-header-fix.sh
===================================================================
--- lldb/trunk/scripts/framework-header-fix.sh
+++ lldb/trunk/scripts/framework-header-fix.sh
@@ -1,14 +1,17 @@
#!/bin/sh
# Usage: framework-header-fix.sh <source header dir> <LLDB Version>
+
+set -e
+
for file in `find $1 -name "*.h"`
do
- sed -i.bak 's/\(#include\)[ ]*"lldb\/\(API\/\)\{0,1\}\(.*\)"/\1 <LLDB\/\3>/1' "$file"
- sed -i.bak 's|<LLDB/Utility|<LLDB|' "$file"
+ /usr/bin/sed -i.bak 's/\(#include\)[ ]*"lldb\/\(API\/\)\{0,1\}\(.*\)"/\1 <LLDB\/\3>/1' "$file"
+ /usr/bin/sed -i.bak '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.bak "s|//#define LLDB_VERSION$|#define LLDB_VERSION $LLDB_VERSION |" "$file"
- sed -i.bak "s|//#define LLDB_REVISION|#define LLDB_REVISION $LLDB_REVISION |" "$file"
- sed -i.bak "s|//#define LLDB_VERSION_STRING|#define LLDB_VERSION_STRING \"$LLDB_VERSION_STRING\" |" "$file"
+ /usr/bin/sed -i.bak "s|//#define LLDB_VERSION$|#define LLDB_VERSION $LLDB_VERSION |" "$file"
+ /usr/bin/sed -i.bak "s|//#define LLDB_REVISION|#define LLDB_REVISION $LLDB_REVISION |" "$file"
+ /usr/bin/sed -i.bak "s|//#define LLDB_VERSION_STRING|#define LLDB_VERSION_STRING \"$LLDB_VERSION_STRING\" |" "$file"
rm -f "$file.bak"
done
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49776.172523.patch
Type: text/x-patch
Size: 1499 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181104/73d9be71/attachment.bin>
More information about the llvm-commits
mailing list