Skip to content

Commit

Permalink
Get test configs from GitHub
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Jan 15, 2020
1 parent 7b304ce commit 04cf07f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 16 deletions.
14 changes: 10 additions & 4 deletions buildroot/bin/restore_configs
Original file line number Diff line number Diff line change
@@ -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 *.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 "$RESTORE/Configuration.h" -O Configuration.h
wget "$RESTORE/Configuration_adv.h" -O Configuration_adv.h

cd - >/dev/null
19 changes: 7 additions & 12 deletions buildroot/bin/use_example_configs
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,13 @@

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 "$EXAMPLES/$@/Configuration.h" -O Configuration.h
wget "$EXAMPLES/$@/Configuration_adv.h" -O Configuration_adv.h
wget "$EXAMPLES/$@/_Bootscreen.h" -O _Bootscreen.h
wget "$EXAMPLES/$@/_Statusscreen.h" -O _Statusscreen.h

if [ -f "config/examples/$@/_Statusscreen.h" ]; then
cp "config/examples/$@/_Statusscreen.h" Marlin/
fi
cd - >/dev/null

0 comments on commit 04cf07f

Please sign in to comment.