Skip to content

Commit

Permalink
Fix for OSX sed not having \+
Browse files Browse the repository at this point in the history
  • Loading branch information
sjoelund committed Nov 26, 2019
1 parent ee29dc4 commit 0847e2f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion OMCompiler/Compiler/boot/find-unused-import.sh
Expand Up @@ -22,7 +22,7 @@ for f in "$@"; do
for i in `egrep "^ *(public|protected)? *import" "$f" | grep -o "import \+[A-Za-z0-9_]\+ *;" | cut -d" " -f2 | cut -d";" -f1`; do
if ! grep "$i" "$f" | grep -q -v "import \+$i *[;]"; then
echo "Unused import $i in $f"
sed -i.bak "/^ *[a-z]* *import \+$i *;/d" "$f"
sed -i.bak "/^ *[a-z]* *import *$i *;/d" "$f"
rm -f "$f.bak"
CONTINUE=1
EXIT=1
Expand Down

0 comments on commit 0847e2f

Please sign in to comment.