Merge tag '2.0.6.1' of https://github.com/MarlinFirmware/Marlin into master
This commit is contained in:
1
buildroot/bin/.gitattributes
vendored
Normal file
1
buildroot/bin/.gitattributes
vendored
Normal file
@ -0,0 +1 @@
|
||||
* text=auto eol=lf
|
30
buildroot/bin/format_code
Executable file
30
buildroot/bin/format_code
Executable file
@ -0,0 +1,30 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# format_code [dir/file...]
|
||||
#
|
||||
|
||||
HERE=`dirname $0`
|
||||
|
||||
while [[ $# -gt 0 ]]; do
|
||||
|
||||
val="$1"
|
||||
|
||||
if [ -d "$val" ]; then
|
||||
|
||||
find $val -name *.cpp -exec "$HERE/uncrust" '{}' \;
|
||||
|
||||
elif [ -d "./Marlin/src/$val" ]; then
|
||||
|
||||
find "./Marlin/src/$val" -name *.cpp -exec "$HERE/uncrust" '{}' \;
|
||||
|
||||
elif [ -f "./Marlin/src/$val" ]; then
|
||||
|
||||
uncrust "./Marlin/src/$val"
|
||||
|
||||
elif [ -f "$val" ]; then
|
||||
|
||||
uncrust "$val"
|
||||
|
||||
fi
|
||||
|
||||
done
|
@ -63,7 +63,7 @@ cat > "${DIR}/Version.h" <<EOF
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
@ -1,3 +1,3 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
eval "echo '#define ${@}' >>Marlin/Configuration_adv.h"
|
||||
eval "echo '#define ${@}' | cat - Marlin/Configuration.h > temp && mv temp Marlin/Configuration.h"
|
||||
|
16
buildroot/bin/uncrust
Executable file
16
buildroot/bin/uncrust
Executable file
@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Run uncrustify for a file in-place
|
||||
#
|
||||
|
||||
TMPDIR=`mktemp -d`
|
||||
|
||||
# Reformat a single file to tmp/
|
||||
uncrustify -l CPP -c ./buildroot/share/extras/uncrustify.cfg -f "$1" >$TMPDIR/uncrustify.out
|
||||
|
||||
# Replace the original file
|
||||
cp "$TMPDIR/uncrustify.out" "$1"
|
||||
|
||||
# Clean up, deliberately
|
||||
rm "$TMPDIR/uncrustify.out"
|
||||
rmdir "$TMPDIR"
|
@ -1,15 +1,21 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
IFS=: read -r PART1 PART2 <<< "$@"
|
||||
[ -n "${PART2}" ] && { REPO="$PART1" ; RDIR="${PART2// /%20}" ; } \
|
||||
|| { REPO=bugfix-2.0.x ; RDIR="${PART1// /%20}" ; }
|
||||
EXAMPLES="https://raw.githubusercontent.com/MarlinFirmware/Configurations/$REPO/config/examples"
|
||||
|
||||
which curl >/dev/null && TOOL='curl -L -s -S -f -o wgot'
|
||||
which wget >/dev/null && TOOL='wget -q -O wgot'
|
||||
|
||||
restore_configs
|
||||
|
||||
EXAMPLES="https://raw.githubusercontent.com/MarlinFirmware/Configurations/bugfix-2.0.x/config/examples"
|
||||
|
||||
cd Marlin
|
||||
|
||||
wget -q "$EXAMPLES/$@/Configuration.h" -O wgot && mv wgot Configuration.h
|
||||
wget -q "$EXAMPLES/$@/Configuration_adv.h" -O wgot && mv wgot Configuration_adv.h
|
||||
wget -q "$EXAMPLES/$@/_Bootscreen.h" -O wgot && mv wgot _Bootscreen.h
|
||||
wget -q "$EXAMPLES/$@/_Statusscreen.h" -O wgot && mv wgot _Statusscreen.h
|
||||
rm -f wgot
|
||||
$TOOL "$EXAMPLES/$RDIR/Configuration.h" >/dev/null 2>&1 && mv wgot Configuration.h
|
||||
$TOOL "$EXAMPLES/$RDIR/Configuration_adv.h" >/dev/null 2>&1 && mv wgot Configuration_adv.h
|
||||
$TOOL "$EXAMPLES/$RDIR/_Bootscreen.h" >/dev/null 2>&1 && mv wgot _Bootscreen.h
|
||||
$TOOL "$EXAMPLES/$RDIR/_Statusscreen.h" >/dev/null 2>&1 && mv wgot _Statusscreen.h
|
||||
|
||||
rm -f wgot
|
||||
cd - >/dev/null
|
||||
|
Reference in New Issue
Block a user