Skip to content

Commit 2793628

Browse files
authored
chore: make postcompile.sh script work on macOS (#681)
On macOS the script was interpreted as the value of the `-i` option. It will now use an empty extension for the `-i` option and the `-e` option to specify the script.
1 parent e7b4700 commit 2793628

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

postcompile.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
cp ./support/package.cjs.json ./build/cjs/package.json
44
cp ./support/package.esm.json ./build/esm/package.json
55

66
cp -r ./build/esm/ ./build/esm-debug/
77

8-
sed -i '/debug(/d' ./build/esm/*.js ./build/esm/**/*.js
8+
if [ "${OSTYPE:0:6}" = darwin ]; then
9+
sed -i '' -e '/debug(/d' ./build/esm/*.js ./build/esm/**/*.js
10+
else
11+
sed -i -e '/debug(/d' ./build/esm/*.js ./build/esm/**/*.js
12+
fi

0 commit comments

Comments
 (0)