Skip to content

Commit 0293cbb

Browse files
author
Andrii Kirmas
committed
Change buggy grep to perl
1 parent 1453ec0 commit 0293cbb

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

postcompile.sh

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,6 @@ cd "$dir" || exit 1
1010

1111
cd "$npm_package_types" || exit 1
1212

13-
sed -ir 's/(<reference )types(="[^"]+)"/\1path\2.d.ts"/' index.d.ts
14-
result="$?"
15-
16-
if [ "$result" ]; then
17-
echo "another"
18-
sed -i '' -r 's/(<reference )types(="[^"]+)"/\1path\2.d.ts"/' index.d.ts
19-
else
20-
echo "was ok"
21-
fi
13+
# https://stackoverflow.com/a/4247319/9412937
14+
# sed -i'' -r 's/(<reference )types(="[^"]+)"/\1path\2.d.ts"/' index.d.ts
15+
perl -i -pe's/(<reference )types(="[^"]+)"/\1path\2.d.ts"/' index.d.ts

0 commit comments

Comments
 (0)