| 1 |
#!/bin/sh |
| 2 |
# A fake wasm-opt, which does nothing at all |
| 3 |
# See also: tool/wasm-clangw |
| 4 |
|
| 5 |
set -e |
| 6 |
input= |
| 7 |
output= |
| 8 |
while [ $# -ne 0 ]; do |
| 9 |
case "$1" in |
| 10 |
-o) |
| 11 |
shift |
| 12 |
output=$1 |
| 13 |
;; |
| 14 |
-*) |
| 15 |
# ignore other options |
| 16 |
;; |
| 17 |
*) |
| 18 |
input=$1 |
| 19 |
;; |
| 20 |
esac |
| 21 |
shift |
| 22 |
done |
| 23 |
|
| 24 |
if [ -z "$input" ]; then |
| 25 |
echo "missing input binary" |
| 26 |
exit 1 |
| 27 |
fi |
| 28 |
|
| 29 |
if [ -z "$output" ]; then |
| 30 |
echo "missing output binary" |
| 31 |
exit 1 |
| 32 |
fi |
| 33 |
|
| 34 |
if [ "$input" != "$output" ]; then |
| 35 |
cp "$input" "$output" |
| 36 |
fi |