Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
LGTM, and works on this end :)

Co-authored-by: MrTylerjet <[email protected]>
  • Loading branch information
kvikindi and Tylerjet authored Mar 17, 2024
1 parent 879acad commit 7129a89
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions docs/manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,19 @@ A klipper macro can look like this:
```yaml
[gcode_macro update_git]
gcode:
{% if params.MESSAGE|default("") != "" %}
RUN_SHELL_COMMAND CMD=update_git_script PARAMS="'{params.MESSAGE}'"
{% set message = params.MESSAGE|default() %}
{% if message %}
RUN_SHELL_COMMAND CMD=update_git_script_message PARAMS="'{params.MESSAGE}'"
{% else %}
RUN_SHELL_COMMAND CMD=update_git_script
{% endif %}

[gcode_shell_command update_git_script]
command: bash -c "bash $HOME/klipper-backup/script.sh"
timeout: 90.0
verbose: True

[gcode_shell_command update_git_script_message]
command: bash -c "bash $HOME/klipper-backup/script.sh $0"
timeout: 90.0
verbose: True
Expand Down

0 comments on commit 7129a89

Please sign in to comment.