Skip to content

Commit

Permalink
Install usbip if missing (#205)
Browse files Browse the repository at this point in the history
  • Loading branch information
ia0 authored Aug 21, 2023
1 parent fd5beee commit 255a863
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions scripts/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,13 @@ MISSING=
add_missing() {
MISSING="$MISSING $1"
}
ensure_pkg() {
pkg-config --exists $2 || add_missing $1
has_pkg() {
pkg-config --exists $1
}

ensure_pkg libudev-dev libudev
ensure_pkg libusb-1.0-0-dev libusb-1.0
has_pkg libudev || add_missing libudev-dev
has_pkg libusb-1.0 || add_missing libusb-1.0-0-dev
has_bin usbip || add_missing usbip

if [ -n "$MISSING" ]; then
has_bin apt-get || e "Unsupported system. Install:$MISSING"
Expand Down

0 comments on commit 255a863

Please sign in to comment.