Move pins files to subfolders #14573
This commit is contained in:
7
buildroot/bin/backup_ramps
Executable file
7
buildroot/bin/backup_ramps
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
PINS="Marlin/src/pins"
|
||||
RAMPS="$PINS/ramps/pins_RAMPS.h"
|
||||
BKUP="$PINS/ramps/pins_RAMPS.backup.h"
|
||||
|
||||
[[ -f $RAMPS ]] && cp "$RAMPS" "$BKUP"
|
@@ -1,5 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
SED=$(which gsed || which sed)
|
||||
IFS='/' read -r -a PINPATH <<< "$1"
|
||||
DIR=${PINPATH[0]}
|
||||
NAM=${PINPATH[1]}
|
||||
PIN=$2
|
||||
VAL=$3
|
||||
|
||||
eval "${SED} -E -i 's/(\/\/)?(#define \b${2}\b).*$/\2 ${3}/g' Marlin/src/pins/pins_${1}.h"
|
||||
SED=$(which gsed || which sed)
|
||||
eval "${SED} -E -i 's/(\/\/)?(#define +${PIN}\b).*$/\2 ${VAL}/g' Marlin/src/pins/$DIR/pins_${NAM}.h"
|
||||
|
@@ -2,8 +2,10 @@
|
||||
|
||||
cp config/default/Configuration*.h Marlin
|
||||
|
||||
[ -f Marlin/src/pins/pins_RAMPS.h.backup ] && cp Marlin/src/pins/pins_RAMPS.h.backup Marlin/src/pins/pins_RAMPS.h
|
||||
rm -f Marlin/src/pins/pins_RAMPS.h.backup
|
||||
PINS="Marlin/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
|
||||
|
Reference in New Issue
Block a user