2018-10-09 18:40:10 +02:00
|
|
|
#!/bin/sh
|
2020-05-20 17:09:13 +02:00
|
|
|
packages=$(cat <<EOF
|
2018-10-09 18:40:10 +02:00
|
|
|
git \
|
|
|
|
wget \
|
|
|
|
gmake \
|
|
|
|
gcc \
|
|
|
|
zip \
|
|
|
|
unzip \
|
|
|
|
avr-binutils \
|
|
|
|
avr-gcc \
|
|
|
|
avr-libc \
|
|
|
|
dfu-programmer \
|
|
|
|
dfu-util \
|
2020-05-20 17:09:13 +02:00
|
|
|
avrdude \
|
2018-10-09 18:40:10 +02:00
|
|
|
arm-none-eabi-gcc \
|
|
|
|
arm-none-eabi-binutils \
|
|
|
|
arm-none-eabi-newlib \
|
2019-05-06 19:56:34 +02:00
|
|
|
diffutils \
|
|
|
|
python3
|
2020-05-20 17:09:13 +02:00
|
|
|
EOF
|
|
|
|
)
|
|
|
|
util_dir=$(dirname "$0")
|
|
|
|
if [ $(id -u) = 0 ]; then
|
|
|
|
pkg update
|
|
|
|
pkg install -y ${packages}
|
|
|
|
echo ""
|
|
|
|
echo "Re-run the setup as your normal user to install the qmk python dependencies"
|
|
|
|
exit 1
|
|
|
|
else
|
|
|
|
if command -v sudo > /dev/null 2>&1; then
|
|
|
|
sudo pkg update
|
2020-07-05 18:20:46 +02:00
|
|
|
sudo pkg install -y ${packages}
|
2020-05-20 17:09:13 +02:00
|
|
|
else
|
|
|
|
echo "Make sure you run setup as root first to install base OS dependencies..."
|
|
|
|
echo ""
|
|
|
|
fi
|
|
|
|
|
|
|
|
python3 -m pip install --user -r ${util_dir}/../requirements.txt
|
|
|
|
fi
|