Verified Commit bcc2f0b6 authored by nagayama15's avatar nagayama15

Improve shell script

parent 88d85c33
#!/usr/bin/env zsh #!/usr/bin/env zsh
cd "$(dirname "$0")" || exit 1 path=("${0:A:h}/../build/src" $path[@])
path=("$PWD/../build/src" $path[@])
wasms=( wasms=(
$PWD/styled-jsx/mappings.wasm "${0:A:h}/styled-jsx/mappings.wasm"
$PWD/zlib-wasm/zlib-sample.wasm "${0:A:h}/zlib-wasm/zlib-sample.wasm"
$PWD/ammo.js/ammo.js/builds/ammo.wasm.wasm "${0:A:h}/ammo.js/ammo.js/builds/ammo.wasm.wasm"
) )
echo "name, size[B], funcs, opswap[bit], funcord[bit]" echo "name, size[B], funcs, opswap[bit], funcord[bit]"
...@@ -15,5 +14,5 @@ do ...@@ -15,5 +14,5 @@ do
funcs="$(funccnt "$i")" funcs="$(funccnt "$i")"
funcord="$((snpi "$i" funcord "Test" > /dev/null) |& awk '{print $1}')" funcord="$((snpi "$i" funcord "Test" > /dev/null) |& awk '{print $1}')"
opswap="$((snpi "$i" opswap "Test" > /dev/null) |& awk '{print $1}')" opswap="$((snpi "$i" opswap "Test" > /dev/null) |& awk '{print $1}')"
echo "${i/$PWD\//}, $size, $funcs, $opswap, $funcord" echo "${i/${0:A:h}\//}, $size, $funcs, $opswap, $funcord"
done done
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment