diff --git a/martyn_macros.cfg b/martyn_macros.cfg index 203763b..ab7f5a8 100644 --- a/martyn_macros.cfg +++ b/martyn_macros.cfg @@ -55,6 +55,7 @@ gcode: M107 ; turn off fan RESTORE_GCODE_STATE NAME=STATE_PRINT_END + BACKUP_CFG ;backup the config in case anything changed since last print. [gcode_macro G32] gcode: @@ -270,4 +271,14 @@ gcode: # Restore previous gcode state (absolute/relative, etc) RESTORE_GCODE_STATE NAME=TEST_SPEED - \ No newline at end of file + + +[gcode_shell_command backup_cfg] +command: ~/printer_data/config/autocommit.sh +timeout: 30 +verbose: True + +[gcode_macro BACKUP_CFG] +description: Backs up config directory GitHub +gcode: + RUN_SHELL_COMMAND CMD=backup_cfg