Merge upstream changes from Marlin 2.1.1
This commit is contained in:
@@ -34,8 +34,8 @@ COMMIT_STEPS=0
|
||||
#cd "$CONFIGREPO" 2>/dev/null || { echo "Can't find Configurations repo!" ; exit 1; }
|
||||
|
||||
ACTION=${1:-init}
|
||||
IMPORT=${2:-"import-2.0.x"}
|
||||
EXPORT=${3:-"bugfix-2.0.x"}
|
||||
IMPORT=${2:-"import-2.1.x"}
|
||||
EXPORT=${3:-"bugfix-2.1.x"}
|
||||
|
||||
echo -n "Doing grhh ... " ; grhh ; echo
|
||||
|
||||
@@ -52,7 +52,7 @@ if [[ $ACTION == "manual" ]]; then
|
||||
git checkout $IMPORT || exit
|
||||
|
||||
# Reset from the latest complete state
|
||||
#git reset --hard bugfix-2.0.x
|
||||
#git reset --hard bugfix-2.1.x
|
||||
|
||||
cp "$MARLINREPO/Marlin/"Configuration*.h "$CDEF/"
|
||||
#git add . && git commit -m "Changes from Marlin ($(date '+%Y-%m-%d %H:%M'))."
|
||||
@@ -74,6 +74,8 @@ if [[ $ACTION == "init" ]]; then
|
||||
# a 'BASE' branch with only defaults as a starting point.
|
||||
#
|
||||
|
||||
SED=$(which gsed sed | head -n1)
|
||||
|
||||
echo "- Initializing BASE branch..."
|
||||
|
||||
# Use the import branch as the source
|
||||
@@ -82,6 +84,14 @@ if [[ $ACTION == "init" ]]; then
|
||||
# Copy to a temporary location
|
||||
TEMP=$( mktemp -d ) ; cp -R config $TEMP
|
||||
|
||||
# Strip all #error lines
|
||||
IFS=$'\n'; set -f
|
||||
for fn in $( find $TEMP/config -type f -name "Configuration.h" ); do
|
||||
$SED -i~ -e "20,30{/#error/d}" "$fn"
|
||||
rm "$fn~"
|
||||
done
|
||||
unset IFS; set +f
|
||||
|
||||
# Make sure we're not on the 'BASE' branch...
|
||||
git checkout init-repo >/dev/null 2>&1 || exit
|
||||
|
||||
@@ -100,56 +110,17 @@ if [[ $ACTION == "init" ]]; then
|
||||
((COMMIT_STEPS)) && git add . >/dev/null && git commit -m "Commit for comparison" >/dev/null
|
||||
|
||||
# Init Cartesian/SCARA/TPARA configurations to default
|
||||
echo "- Initializing Cartesian/SCARA/TPARA configs to default state..."
|
||||
echo "- Initializing configs to default state..."
|
||||
|
||||
find "$CEXA" -name $BC ! -path */delta/* -print0 \
|
||||
find "$CEXA" -name $BC -print0 \
|
||||
| while read -d $'\0' F ; do cp "$CDEF/$BC" "$F" ; done
|
||||
find "$CEXA" -name $AC ! -path */delta/* -print0 \
|
||||
find "$CEXA" -name $AC -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/TPARA configs..." >/dev/null
|
||||
|
||||
# Create base Delta configurations
|
||||
cp "$CDEF"/* "$CEXA/delta/generic"
|
||||
|
||||
# DEBUG: Commit the reset for review
|
||||
((COMMIT_STEPS)) && git add . >/dev/null && git commit -m "Reset Generic Delta..." >/dev/null
|
||||
|
||||
cp -R "$TEMP/$CEXA/delta/generic"/Conf* "$CEXA/delta/generic"
|
||||
|
||||
# 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 Delta reset for review
|
||||
((COMMIT_STEPS)) && git add . >/dev/null && git commit -m "Reset Delta configs..." >/dev/null
|
||||
|
||||
# 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 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
|
||||
((COMMIT_STEPS)) && git add . >/dev/null && git commit -m "Reset configs..." >/dev/null
|
||||
|
||||
# Update the %VERSION% in the README.md file
|
||||
SED=$(which gsed sed | head -n1)
|
||||
VERS=$( echo $EXPORT | $SED 's/release-//' )
|
||||
eval "${SED} -E -i~ -e 's/%VERSION%/$VERS/g' README.md"
|
||||
rm -f README.md~
|
||||
|
Reference in New Issue
Block a user