Skip to content

Commit

Permalink
🔧 Treat TPARA like SCARA in mfconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Jun 15, 2021
1 parent 9268a4b commit 665a71b
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions buildroot/share/git/mfconfig
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ if [[ $ACTION == "manual" ]]; then
git checkout $IMPORT || exit

# Reset from the latest complete state
#git reset --hard master
#git reset --hard bugfix-2.0.x

cp "$MARLINREPO/Marlin/"Configuration*.h "$CDEF/"
#git add . && git commit -m "Changes from Marlin ($(date '+%Y-%m-%d %H:%M'))."
Expand Down Expand Up @@ -99,16 +99,16 @@ if [[ $ACTION == "init" ]]; then
# DEBUG: Commit the original config files for comparison
((COMMIT_STEPS)) && git add . >/dev/null && git commit -m "Commit for comparison" >/dev/null

# Init Cartesian configurations to default
echo "- Initializing configs to default state..."
# Init Cartesian/SCARA/TPARA configurations to default
echo "- Initializing Cartesian/SCARA/TPARA configs to default state..."

find "$CEXA" -name $BC ! -path */delta/* -print0 \
| while read -d $'\0' F ; do cp "$CDEF/$BC" "$F" ; done
find "$CEXA" -name $AC ! -path */delta/* -print0 \
| while read -d $'\0' F ; do cp "$CDEF/$AC" "$F" ; done

# DEBUG: Commit the reset for review
((COMMIT_STEPS)) && git add . >/dev/null && git commit -m "Reset Cartesian/SCARA configs..." >/dev/null
((COMMIT_STEPS)) && git add . >/dev/null && git commit -m "Reset Cartesian/SCARA/TPARA configs..." >/dev/null

# Create base Delta configurations
cp "$CDEF"/* "$CEXA/delta/generic"
Expand All @@ -121,23 +121,33 @@ if [[ $ACTION == "init" ]]; then
# DEBUG: Commit Generic Delta changes for review
((COMMIT_STEPS)) && git add . >/dev/null && git commit -m "Apply Generic Delta..." >/dev/null

# Reset all Delta configs to the generic version
find "$CEXA/delta" -name $BC ! -path */generic/* -print0 \
| while read -d $'\0' F ; do cp "$CEXA/delta/generic/$BC" "$F" ; done
find "$CEXA/delta" -name $AC ! -path */generic/* -print0 \
| while read -d $'\0' F ; do cp "$CEXA/delta/generic/$AC" "$F" ; done

# DEBUG: Commit the reset for review
# DEBUG: Commit the Delta reset for review
((COMMIT_STEPS)) && git add . >/dev/null && git commit -m "Reset Delta configs..." >/dev/null

# SCARA configurations
# Reset all SCARA configs to the default cartesian
find "$CEXA/SCARA" -name $BC \
| while read -d $'\0' F ; do cp "$CDEF/$BC" "$F" ; done
find "$CEXA/SCARA" -name $AC \
| while read -d $'\0' F ; do cp "$CDEF/$AC" "$F" ; done

# DEBUG: Commit the reset for review or...
# DEBUG: Commit the SCARA reset for review
((COMMIT_STEPS)) && git add . >/dev/null && git commit -m "Reset SCARA..." >/dev/null

# Reset all TPARA configs to the default cartesian
find "$CEXA/TPARA" -name $BC \
| while read -d $'\0' F ; do cp "$CDEF/$BC" "$F" ; done
find "$CEXA/TPARA" -name $AC \
| while read -d $'\0' F ; do cp "$CDEF/$AC" "$F" ; done

# DEBUG: Commit the TPARA reset for review
((COMMIT_STEPS)) && git add . >/dev/null && git commit -m "Reset TPARA..." >/dev/null

# Update the %VERSION% in the README.md file
SED=$(which gsed || which sed)
VERS=$( echo $EXPORT | $SED 's/release-//' )
Expand Down

0 comments on commit 665a71b

Please sign in to comment.