diff options
| author | Pete Johanson <peter@peterjohanson.com> | 2020-05-20 11:09:13 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-05-20 08:09:13 -0700 |
| commit | 3ad2be52a7098c269d741f8d59a424afdbd7302d (patch) | |
| tree | 815e12fb6d1cf2c3c0900b036cf8fcdd8524c005 /util | |
| parent | 0fbcb41c8509279751b8676211b8686b1b866508 (diff) | |
| download | qmk_firmware-3ad2be52a7098c269d741f8d59a424afdbd7302d.tar.gz qmk_firmware-3ad2be52a7098c269d741f8d59a424afdbd7302d.zip | |
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>
Diffstat (limited to 'util')
| -rwxr-xr-x | util/freebsd_install.sh | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/util/freebsd_install.sh b/util/freebsd_install.sh index 815759203..09669024c 100755 --- a/util/freebsd_install.sh +++ b/util/freebsd_install.sh | |||
| @@ -1,7 +1,5 @@ | |||
| 1 | #!/bin/sh | 1 | #!/bin/sh |
| 2 | util_dir=$(dirname "$0") | 2 | packages=$(cat <<EOF |
| 3 | pkg update | ||
| 4 | pkg install -y \ | ||
| 5 | git \ | 3 | git \ |
| 6 | wget \ | 4 | wget \ |
| 7 | gmake \ | 5 | gmake \ |
| @@ -13,9 +11,29 @@ pkg install -y \ | |||
| 13 | avr-libc \ | 11 | avr-libc \ |
| 14 | dfu-programmer \ | 12 | dfu-programmer \ |
| 15 | dfu-util \ | 13 | dfu-util \ |
| 14 | avrdude \ | ||
| 16 | arm-none-eabi-gcc \ | 15 | arm-none-eabi-gcc \ |
| 17 | arm-none-eabi-binutils \ | 16 | arm-none-eabi-binutils \ |
| 18 | arm-none-eabi-newlib \ | 17 | arm-none-eabi-newlib \ |
| 19 | diffutils \ | 18 | diffutils \ |
| 20 | python3 | 19 | python3 |
| 21 | pip3 install -r ${util_dir}/../requirements.txt | 20 | EOF |
| 21 | ) | ||
| 22 | util_dir=$(dirname "$0") | ||
| 23 | if [ $(id -u) = 0 ]; then | ||
| 24 | pkg update | ||
| 25 | pkg install -y ${packages} | ||
| 26 | echo "" | ||
| 27 | echo "Re-run the setup as your normal user to install the qmk python dependencies" | ||
| 28 | exit 1 | ||
| 29 | else | ||
| 30 | if command -v sudo > /dev/null 2>&1; then | ||
| 31 | sudo pkg update | ||
| 32 | sudp pkg install -y ${packages} | ||
| 33 | else | ||
| 34 | echo "Make sure you run setup as root first to install base OS dependencies..." | ||
| 35 | echo "" | ||
| 36 | fi | ||
| 37 | |||
| 38 | python3 -m pip install --user -r ${util_dir}/../requirements.txt | ||
| 39 | fi | ||
