2018-12-31 17:46:20 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2019-01-18 19:57:20 +00:00
|
|
|
ARCH=$(python <<EOF
|
|
|
|
from __future__ import print_function
|
|
|
|
import platform
|
|
|
|
processor = platform.machine()
|
|
|
|
architecture = platform.architecture()
|
|
|
|
if processor == 'aarch64':
|
|
|
|
# Mutli arch arm support is why this 32bit check is present
|
|
|
|
if '32bit' in architecture:
|
|
|
|
print('armv71', end='')
|
|
|
|
else:
|
|
|
|
print('aarch64', end='')
|
|
|
|
elif processor == 'x86 64' or processor == 'x86_64':
|
|
|
|
print('amd64', end='')
|
|
|
|
elif processor == 'armv7l':
|
|
|
|
print('armhf', end='')
|
|
|
|
EOF
|
|
|
|
)
|
2018-12-31 17:46:20 +00:00
|
|
|
|
2019-01-18 19:57:20 +00:00
|
|
|
if [ $ARCH == "aarch64" -o $ARCH == "armv71" ] ; then
|
2018-12-31 17:46:20 +00:00
|
|
|
export PATH=/opt/local/llvm/bin:${PATH}
|
|
|
|
cd /app
|
2021-02-11 18:37:37 +00:00
|
|
|
RUSTFLAGS="-C linker=lld --cfg=web_sys_unstable_apis" wasm-pack build --target web --release plume-front
|
2018-12-31 17:46:20 +00:00
|
|
|
else
|
2021-02-11 18:37:37 +00:00
|
|
|
RUSTFLAGS="--cfg=web_sys_unstable_apis" wasm-pack build --target web --release plume-front
|
2018-12-31 17:46:20 +00:00
|
|
|
fi
|