1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-19 23:22:16 +03:00
esp8266/tests/restyle-all.sh
Allman-astyler eea9999dc5 Revert "Allman now (#6080)" (#6090)
This reverts commit 98125f88605cd7e46e9be4e1b3ad0600dd5d2b51.
2019-05-14 00:09:54 +02:00

32 lines
728 B
Bash
Executable File

#!/bin/sh
set -e
org=$(cd ${0%/*}; pwd)
cd ${org}/..
pwd
test -d cores/esp8266
test -d libraries
# this warning question will be removed after restyle-all.sh is renamed to restyle.sh
echo "This is dangerous if you have modified your local repository"
echo "type iknowwhatido to continue"
read ans
test "$ans" = iknowwhatido || exit 1
for d in cores/esp8266 libraries; do
for e in c cpp h; do
find $d -name "*.$e" -exec \
astyle \
--suffix=none \
--options=${org}/astyle_core.conf {} \;
done
done
for d in libraries; do
find $d -name "*.ino" -exec \
astyle \
--suffix=none \
--options=${org}/astyle_examples.conf {} \;
done