From bd550bb45a88249b56f0f8843a03a7d023d28082 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 14 Jan 2020 23:56:54 -0600 Subject: [PATCH] Get test configs from GitHub --- buildroot/bin/restore_configs | 14 ++++++++++---- buildroot/bin/use_example_configs | 20 ++++++++------------ 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/buildroot/bin/restore_configs b/buildroot/bin/restore_configs index a1ac70aa9..5e24d8d7c 100755 --- a/buildroot/bin/restore_configs +++ b/buildroot/bin/restore_configs @@ -1,11 +1,17 @@ #!/usr/bin/env bash -cp config/default/Configuration*.h Marlin +RESTORE="https://raw.githubusercontent.com/MarlinFirmware/Configurations/master/config/default" -PINS="Marlin/src/pins" +cd Marlin + +rm -f Conf*.h _*screen.h + +PINS="src/pins" RAMPS="$PINS/ramps/pins_RAMPS.h" BKUP="$PINS/ramps/pins_RAMPS.backup.h" [ -f $BKUP ] && { cp "$BKUP" "$RAMPS" ; rm -f $BKUP ; } -rm -f Marlin/_Bootscreen.h -rm -f Marlin/_Statusscreen.h +wget -q "$RESTORE/Configuration.h" -O Configuration.h +wget -q "$RESTORE/Configuration_adv.h" -O Configuration_adv.h + +cd - >/dev/null diff --git a/buildroot/bin/use_example_configs b/buildroot/bin/use_example_configs index a0a0dcd3d..410091cbd 100755 --- a/buildroot/bin/use_example_configs +++ b/buildroot/bin/use_example_configs @@ -2,18 +2,14 @@ restore_configs -if [ -f "config/examples/$@/Configuration.h" ]; then - cp "config/examples/$@/Configuration.h" Marlin/ -fi +EXAMPLES="https://raw.githubusercontent.com/MarlinFirmware/Configurations/master/config/examples" -if [ -f "config/examples/$@/Configuration_adv.h" ]; then - cp "config/examples/$@/Configuration_adv.h" Marlin/ -fi +cd Marlin -if [ -f "config/examples/$@/_Bootscreen.h" ]; then - cp "config/examples/$@/_Bootscreen.h" Marlin/ -fi +wget -q "$EXAMPLES/$@/Configuration.h" -O wgot && mv wgot Configuration.h +wget -q "$EXAMPLES/$@/Configuration_adv.h" -O wgot && mv wgot Configuration_adv.h +wget -q "$EXAMPLES/$@/_Bootscreen.h" -O wgot && mv wgot _Bootscreen.h +wget -q "$EXAMPLES/$@/_Statusscreen.h" -O wgot && mv wgot _Statusscreen.h +rm -f wgot -if [ -f "config/examples/$@/_Statusscreen.h" ]; then - cp "config/examples/$@/_Statusscreen.h" Marlin/ -fi +cd - >/dev/null