#!/bin/bash
cd
# git update-git-for-windows
if type -p arduino-cli >/dev/null; then
echo "arduino-cli is installed."
sleep 1
else
# install (or upgrade) arduino-cli
curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | sh
fi
if type -p arduino-cli >/dev/null; then
echo "arduino-cli is installed."
sleep 1
else
# add $HOME/bin to PATH
export PATH="$HOME/bin:$PATH"
read -p "Do you want to add $HOME/bin to PATH? (y/n) " answer
if [[ "$answer" == "y" ]]; then
echo 'export PATH="$HOME/bin:$PATH"' >> $HOME/.bashrc
source $HOME/.bashrc
echo "Added $HOME/bin to PATH. You may need to restart your terminal for the changes to take effect."
fi
fi
arduino-cli update
arduino-cli upgrade
arduino-cli version
# download m5scp2_exp (by miura)
if [ -d "m5scp2_exp" ]; then
echo "m5scp2_exp folder exists."
cd m5scp2_exp
git pull
ls -al
cd ..
else
git clone https://git.istlab.info/git/miura250/m5scp2_exp.git
fi