Skip to content

Commit

Permalink
Fix docker script and document (#7786)
Browse files Browse the repository at this point in the history
Fixed error when keyboard parameter is omitted in interactive mode.
  • Loading branch information
shelaf authored and zvecr committed Jan 10, 2020
1 parent 886eb98 commit 5a02cc0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/getting_started_build_tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,12 @@ If this is a bit complex for you, Docker might be the turnkey solution you need.
util/docker_build.sh keyboard:keymap
# For example: util/docker_build.sh ergodox_ez:steno
```
This will compile the desired keyboard/keymap and leave the resulting `.hex` or `.bin` file in the QMK directory for you to flash. If `:keymap` is omitted, the `default` keymap is used. Note that the parameter format is the same as when building with `make`.
This will compile the desired keyboard/keymap and leave the resulting `.hex` or `.bin` file in the QMK directory for you to flash. If `:keymap` is omitted, all keymaps are used. Note that the parameter format is the same as when building with `make`.

You can also start the script without any parameters, in which case it will ask you to input the build parameters one by one, which you may find easier to use:
```bash
util/docker_build.sh
# Reads parameters as input (leave blank for defaults)
# Reads parameters as input (leave blank for all keyboards/keymaps)
```

There is also support for building _and_ flashing the keyboard straight from Docker by specifying the `target` as well:
Expand Down
3 changes: 3 additions & 0 deletions util/docker_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ else
exit 1
fi
fi
if [ -z "$keyboard" ]; then
keyboard=all
fi
if [ -n "$target" ]; then
if [ "$(uname)" = "Linux" ] || docker-machine active >/dev/null 2>&1; then
usb_args="--privileged -v /dev:/dev"
Expand Down

0 comments on commit 5a02cc0

Please sign in to comment.