qmk_firmware/util/freebsd_install.sh
Pete Johanson 3ad2be52a7
CLI: Improve experience when running qmk setup on FreeBSD. (#8798)
* CLI: Improve experience when running `qmk setup` on FreeBSD.

* Install the `avrdude` package as well.
* Switch to installing python packages w/ `--user` flag.
* Basic getting started sections for FreeBSD.
* Update `util/freebsd_install.sh` for root/non-root branches.

* Add ID to doc section.

Co-Authored-By: skullydazed <skullydazed@users.noreply.github.com>

* Add ID to another docs section.

Co-Authored-By: skullydazed <skullydazed@users.noreply.github.com>

* Use `; then` in script for consistency.

Co-Authored-By: skullydazed <skullydazed@users.noreply.github.com>

* Updated to use sudo in one shot if available.

* Apply suggestions from code review

Co-authored-by: Erovia <Erovia@users.noreply.github.com>

* Style fixes for latest version in master.

* Apply suggestions from code review

Co-authored-by: Ryan <fauxpark@gmail.com>

Co-authored-by: skullydazed <skullydazed@users.noreply.github.com>
Co-authored-by: Erovia <Erovia@users.noreply.github.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
2020-05-20 08:09:13 -07:00

40 lines
721 B
Bash
Executable File

#!/bin/sh
packages=$(cat <<EOF
git \
wget \
gmake \
gcc \
zip \
unzip \
avr-binutils \
avr-gcc \
avr-libc \
dfu-programmer \
dfu-util \
avrdude \
arm-none-eabi-gcc \
arm-none-eabi-binutils \
arm-none-eabi-newlib \
diffutils \
python3
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
sudp pkg install -y ${packages}
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