mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2024-11-23 12:04:19 +00:00
31 lines
439 B
Plaintext
31 lines
439 B
Plaintext
|
#!/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
|