diff options
author | jdlugosz963 <jdlugosz963@gmail.com> | 2023-07-25 15:51:34 +0200 |
---|---|---|
committer | jdlugosz963 <jdlugosz963@gmail.com> | 2023-07-25 15:51:34 +0200 |
commit | 2a5d171484392d55f3abfd9e48807edc77c182b0 (patch) | |
tree | d5aee3b0ffe25a3dc078ad0339e4c550461e13fa /.bin/arduino-cli | |
parent | 76187138be10009bd39ab1bfc50aecde6516f14f (diff) | |
download | dotfiles-2a5d171484392d55f3abfd9e48807edc77c182b0.tar.gz dotfiles-2a5d171484392d55f3abfd9e48807edc77c182b0.zip |
Add arduino-cli docker file.
Diffstat (limited to '.bin/arduino-cli')
-rwxr-xr-x | .bin/arduino-cli | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/.bin/arduino-cli b/.bin/arduino-cli new file mode 100755 index 0000000..7c0d41a --- /dev/null +++ b/.bin/arduino-cli | |||
@@ -0,0 +1,14 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) | ||
4 | |||
5 | if [[ $(docker images | grep jd-arduino-cli | wc -l) -eq 0 ]] | ||
6 | then | ||
7 | docker build -f "$SCRIPT_DIR/jd-arduino-cli.Dockerfile" -t jd-arduino-cli . | ||
8 | fi | ||
9 | |||
10 | docker run --rm --network none -it --privileged \ | ||
11 | -v $(pwd):/src \ | ||
12 | -v jd-arduino-cli-tmp:/tmp \ | ||
13 | -v /dev:/dev jd-arduino-cli \ | ||
14 | arduino-cli $@ | ||