Skip to content

Commit

Permalink
fix sed for linux
Browse files Browse the repository at this point in the history
  • Loading branch information
ceifa committed Aug 11, 2023
1 parent 30c0c82 commit b5091e2
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ else
extension="$extension -O3 --closure 1"
fi

sed -i '' "s/^#define LUA_32BITS\t0$/#define LUA_32BITS\t1/" ./lua/luaconf.h > /dev/null
if [[ "$OSTYPE" == "darwin"* ]]; then
sed -i '' "s/^#define LUA_32BITS\t0$/#define LUA_32BITS\t1/" ./lua/luaconf.h
else
sed -i "s/^#define LUA_32BITS\t0$/#define LUA_32BITS\t1/" ./lua/luaconf.h
fi

emcc \
-s WASM=1 $extension -o ./build/glue.js \
Expand Down Expand Up @@ -194,4 +198,8 @@ emcc \
]" \
${LUA_SRC}

sed -i '' "s/^#define LUA_32BITS\t1$/#define LUA_32BITS\t0/" ./lua/luaconf.h > /dev/null
if [[ "$OSTYPE" == "darwin"* ]]; then
sed -i '' "s/^#define LUA_32BITS\t1$/#define LUA_32BITS\t0/" ./lua/luaconf.h
else
sed -i "s/^#define LUA_32BITS\t1$/#define LUA_32BITS\t0/" ./lua/luaconf.h
fi

0 comments on commit b5091e2

Please sign in to comment.