File tree 3 files changed +23
-37
lines changed
3 files changed +23
-37
lines changed Original file line number Diff line number Diff line change @@ -83,4 +83,4 @@ COPY entrypoint.sh $LIBBUILDER_PATH/entrypoint.sh
83
83
84
84
WORKDIR /opt/esp/lib-builder
85
85
ENTRYPOINT [ "/opt/esp/lib-builder/entrypoint.sh" ]
86
- CMD [ "bash " ]
86
+ CMD [ "python3" , "tools/config_editor/app.py " ]
Original file line number Diff line number Diff line change
1
+ $ARDUINO_DIR = $args [0 ] -replace ' \\' , ' /'
2
+ if (-not $ARDUINO_DIR ) {
3
+ $ARDUINO_DIR = (Get-Location ).Path + ' /../'
4
+ }
5
+
6
+ $ARDUINO_DIR = (Get-Item - Path $ARDUINO_DIR ).FullName
7
+ $DOCKER_ARGS = @ ()
8
+ $DOCKER_ARGS += ' -v' , " $ARDUINO_DIR :/arduino-esp32"
9
+ $DOCKER_ARGS += ' -e' , ' TERM=xterm-256color'
10
+ $DOCKER_ARGS += ' -e' , " HOST_UID=$env: UID "
11
+
12
+ if ($env: LIBBUILDER_GIT_SAFE_DIR ) {
13
+ $DOCKER_ARGS += ' -e' , " LIBBUILDER_GIT_SAFE_DIR=$env: LIBBUILDER_GIT_SAFE_DIR "
14
+ }
15
+
16
+ Write-Output " Running: docker run $ ( $DOCKER_ARGS -join ' ' ) lucassvaz/esp32-arduino-lib-builder:latest"
17
+ docker run @ ($DOCKER_ARGS ) lucassvaz/ esp32- arduino- lib- builder:latest python3 tools/ config_editor/ app.py
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
3
- i=0
4
- NEXT_ARG=" false"
5
- ARDUINO_DIR=" "
3
+ ARDUINO_DIR=${1:- $PWD / ../ }
6
4
DOCKER_ARGS=()
7
- ORIGINAL_ARGS=(" $@ " )
8
- TRIMMED_ARGS=()
9
-
10
- while [ $i -lt ${# ORIGINAL_ARGS[@]} ]; do
11
- arg=${ORIGINAL_ARGS[$i]}
12
- if [ $arg == " -c" ]; then
13
- NEXT_ARG=" true"
14
- elif [ $NEXT_ARG == " true" ]; then
15
- ARDUINO_DIR=$arg
16
- NEXT_ARG=" false"
17
- else
18
- TRIMMED_ARGS+=($arg )
19
- fi
20
- i=$(( i + 1 ))
21
- done
22
-
23
- if [ -n " $ARDUINO_DIR " ]; then
24
- if [ ! -d " $ARDUINO_DIR " ]; then
25
- echo " Arduino directory \" $ARDUINO_DIR \" does not exist"
26
- exit 1
27
- fi
28
- ARDUINO_DIR=$( echo $( cd $ARDUINO_DIR ; pwd) )
29
- DOCKER_ARGS+=(-v $ARDUINO_DIR :/arduino-esp32)
30
- TRIMMED_ARGS+=(-c /arduino-esp32)
31
- fi
32
5
6
+ ARDUINO_DIR=$( echo $( cd $ARDUINO_DIR ; pwd) )
7
+ DOCKER_ARGS+=(-v $ARDUINO_DIR :/arduino-esp32)
33
8
DOCKER_ARGS+=(-e TERM=xterm-256color)
34
9
DOCKER_ARGS+=(-e HOST_UID=$UID )
35
10
36
11
if [ -n " $LIBBUILDER_GIT_SAFE_DIR " ]; then
37
12
DOCKER_ARGS+=(-e LIBBUILDER_GIT_SAFE_DIR=$LIBBUILDER_GIT_SAFE_DIR )
38
13
fi
39
14
40
- if [ " $VERBOSE_OUTPUT " -eq 1 ]; then
41
- echo " Arguments:"
42
- echo " DOCKER_ARGS = ${DOCKER_ARGS[@]} "
43
- echo " TRIMMED_ARGS = ${TRIMMED_ARGS[@]} "
44
- echo " Running: docker run ${DOCKER_ARGS[@]} lucassvaz/esp32-arduino-lib-builder ./build.sh ${TRIMMED_ARGS[@]} "
45
- fi
46
-
47
- docker run ${DOCKER_ARGS[@]} lucassvaz/esp32-arduino-lib-builder ./build.sh ${TRIMMED_ARGS[@]}
15
+ echo " Running: docker run ${DOCKER_ARGS[@]} lucassvaz/esp32-arduino-lib-builder:latest"
16
+ docker run ${DOCKER_ARGS[@]} lucassvaz/esp32-arduino-lib-builder:latest python3 tools/config_editor/app.py
You can’t perform that action at this time.
0 commit comments