summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordohq <dorastone@gmail.com>2020-01-28 09:23:24 +0900
committerJoel Challis <git@zvecr.com>2020-01-28 00:23:24 +0000
commita539bd63fead3d35e7d9095a4e5b636e358cbe35 (patch)
treed9ed1ebd62a89f8694fdb7cb3b3b601396cd05b6
parent1b7a003d842c76cd141af726c13e2af1a4458bac (diff)
Fix/remove missing package (#7897)
* [fix] yay instead pacman install bootloadhid * [fix] add needed option * [mod] output red color * [fix] overwrite avr-gcc package * [mod] disable install bootloadhid from aur and check already installed * Apply suggestions from code review Co-Authored-By: Joel Challis <git@zvecr.com> * Update util/linux_install.sh Co-Authored-By: Joel Challis <git@zvecr.com> Co-authored-by: Joel Challis <git@zvecr.com>
-rwxr-xr-xutil/linux_install.sh16
1 files changed, 8 insertions, 8 deletions
diff --git a/util/linux_install.sh b/util/linux_install.sh
index 9229814182..048b2f3189 100755
--- a/util/linux_install.sh
+++ b/util/linux_install.sh
@@ -12,12 +12,14 @@ util_dir=$(dirname "$0")
# For those distros that do not package bootloadHID
install_bootloadhid() {
- wget https://www.obdev.at/downloads/vusb/bootloadHID.2012-12-08.tar.gz -O - | tar -xz -C /tmp
- cd /tmp/bootloadHID.2012-12-08/commandline/
- if make; then
- sudo cp bootloadHID /usr/local/bin
+ if ! command -v bootloadHID >/dev/null; then
+ wget https://www.obdev.at/downloads/vusb/bootloadHID.2012-12-08.tar.gz -O - | tar -xz -C /tmp
+ cd /tmp/bootloadHID.2012-12-08/commandline/
+ if make; then
+ sudo cp bootloadHID /usr/local/bin
+ fi
+ cd -
fi
- cd -
}
if grep ID /etc/os-release | grep -qE "fedora"; then
@@ -73,7 +75,7 @@ elif grep ID /etc/os-release | grep -qE 'debian|ubuntu'; then
zip
elif grep ID /etc/os-release | grep -q 'arch\|manjaro'; then
- sudo pacman -U https://archive.archlinux.org/packages/a/avr-gcc/avr-gcc-8.3.0-1-x86_64.pkg.tar.xz
+ sudo pacman --needed -U https://archive.archlinux.org/packages/a/avr-gcc/avr-gcc-8.3.0-1-x86_64.pkg.tar.xz
sudo pacman -S --needed \
arm-none-eabi-binutils \
arm-none-eabi-gcc \
@@ -81,9 +83,7 @@ elif grep ID /etc/os-release | grep -q 'arch\|manjaro'; then
avrdude \
avr-binutils \
avr-libc \
- avr-gcc \
base-devel \
- bootloadhid \
clang \
dfu-programmer \
dfu-util \