summaryrefslogtreecommitdiffstats
path: root/files/.bin/arduino-cli
blob: 7c0d41afbe8a84f374a83b008e73c166dbce8859 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/sh

SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )

if [[ $(docker images | grep jd-arduino-cli | wc -l) -eq 0 ]]
then
	docker build -f "$SCRIPT_DIR/jd-arduino-cli.Dockerfile" -t jd-arduino-cli .
fi

docker run --rm --network none -it --privileged \
       -v $(pwd):/src \
       -v jd-arduino-cli-tmp:/tmp \
       -v /dev:/dev jd-arduino-cli \
       arduino-cli $@