File: build.sh

package info (click to toggle)
usbrelay 1.0-2.2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 740 kB
  • sloc: ansic: 618; python: 100; makefile: 58; xml: 25; sh: 5
file content (13 lines) | stat: -rwxr-xr-x 462 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
# Builds the usbrelay binary using docker. Docker needs to be installed for this to work.

IMAGE_NAME='usbrelay'
IMAGE_TAG='v2'

# Build the docker image.
sudo docker build -t $IMAGE_NAME:$IMAGE_TAG .

# build the usbrelay source inside the container.
sudo docker run --rm -v "$PWD":/build -w /build $IMAGE_NAME:$IMAGE_TAG make python

# Give file ownership back to the host user:group.
sudo chown -R $USER:$USER usbrelay libusbrelay.so libusbrelay_py.so build/