Browse Source

Get test configs from GitHub

Scott Lahteine 4 years ago
parent
commit
bd550bb45a
2 changed files with 18 additions and 16 deletions
  1. 10
    4
      buildroot/bin/restore_configs
  2. 8
    12
      buildroot/bin/use_example_configs

+ 10
- 4
buildroot/bin/restore_configs View File

1
 #!/usr/bin/env bash
1
 #!/usr/bin/env bash
2
 
2
 
3
-cp config/default/Configuration*.h Marlin
3
+RESTORE="https://raw.githubusercontent.com/MarlinFirmware/Configurations/master/config/default"
4
 
4
 
5
-PINS="Marlin/src/pins"
5
+cd Marlin
6
+
7
+rm -f Conf*.h _*screen.h
8
+
9
+PINS="src/pins"
6
 RAMPS="$PINS/ramps/pins_RAMPS.h"
10
 RAMPS="$PINS/ramps/pins_RAMPS.h"
7
 BKUP="$PINS/ramps/pins_RAMPS.backup.h"
11
 BKUP="$PINS/ramps/pins_RAMPS.backup.h"
8
 [ -f $BKUP ] && { cp "$BKUP" "$RAMPS" ; rm -f $BKUP ; }
12
 [ -f $BKUP ] && { cp "$BKUP" "$RAMPS" ; rm -f $BKUP ; }
9
 
13
 
10
-rm -f Marlin/_Bootscreen.h
11
-rm -f Marlin/_Statusscreen.h
14
+wget -q "$RESTORE/Configuration.h" -O Configuration.h
15
+wget -q "$RESTORE/Configuration_adv.h" -O Configuration_adv.h
16
+
17
+cd - >/dev/null

+ 8
- 12
buildroot/bin/use_example_configs View File

2
 
2
 
3
 restore_configs
3
 restore_configs
4
 
4
 
5
-if [ -f "config/examples/$@/Configuration.h" ]; then
6
-  cp "config/examples/$@/Configuration.h" Marlin/
7
-fi
5
+EXAMPLES="https://raw.githubusercontent.com/MarlinFirmware/Configurations/master/config/examples"
8
 
6
 
9
-if [ -f "config/examples/$@/Configuration_adv.h" ]; then
10
-  cp "config/examples/$@/Configuration_adv.h" Marlin/
11
-fi
7
+cd Marlin
12
 
8
 
13
-if [ -f "config/examples/$@/_Bootscreen.h" ]; then
14
-  cp "config/examples/$@/_Bootscreen.h" Marlin/
15
-fi
9
+wget -q "$EXAMPLES/$@/Configuration.h"     -O wgot && mv wgot Configuration.h
10
+wget -q "$EXAMPLES/$@/Configuration_adv.h" -O wgot && mv wgot Configuration_adv.h
11
+wget -q "$EXAMPLES/$@/_Bootscreen.h"       -O wgot && mv wgot _Bootscreen.h
12
+wget -q "$EXAMPLES/$@/_Statusscreen.h"     -O wgot && mv wgot _Statusscreen.h
13
+rm -f wgot
16
 
14
 
17
-if [ -f "config/examples/$@/_Statusscreen.h" ]; then
18
-  cp "config/examples/$@/_Statusscreen.h" Marlin/
19
-fi
15
+cd - >/dev/null

Loading…
Cancel
Save