forked from ARMmbed/mbed-simulator
-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
setup-ubuntu.bash
26 lines (26 loc) · 997 Bytes
/
setup-ubuntu.bash
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
sudo apt update && sudo apt upgrade -y
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
nvm install --lts
sudo apt install python3-pip python-is-python3 mercurial avahi-daemon
sudo python3 -m pip install mbed-cli
cd $HOME
mkdir workspace
cd workspace
git clone --recurse-submodules https://github.com/alpsayin/mbed-simulator
git clone https://github.com/emscripten-core/emsdk
cd emsdk
./emsdk install fastcomp-clang-e1.38.21-64bit
./emsdk activate fastcomp-clang-e1.38.21-64bit
./emsdk install emscripten-1.38.21
./emsdk activate emscripten-1.38.21
echo 'source "$HOME/workspace/emsdk/emsdk_env.sh"' >> $HOME/.bashrc
source "$HOME/workspace/emsdk/emsdk_env.sh"
cd $HOME/workspace/mbed-simulator/
npm update -g
npm install
npm audit fix
npm audit fix
npm run build-demos