summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rwxr-xr-xutil/freebsd_install.sh26
1 files changed, 22 insertions, 4 deletions
diff --git a/util/freebsd_install.sh b/util/freebsd_install.sh
index 8157592031..09669024cc 100755
--- a/util/freebsd_install.sh
+++ b/util/freebsd_install.sh
@@ -1,7 +1,5 @@
#!/bin/sh
-util_dir=$(dirname "$0")
-pkg update
-pkg install -y \
+packages=$(cat <<EOF
git \
wget \
gmake \
@@ -13,9 +11,29 @@ pkg install -y \
avr-libc \
dfu-programmer \
dfu-util \
+ avrdude \
arm-none-eabi-gcc \
arm-none-eabi-binutils \
arm-none-eabi-newlib \
diffutils \
python3
-pip3 install -r ${util_dir}/../requirements.txt
+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