FTXUI/tools/format.sh
Tushar Maheshwari a40a54ec10
Improve documentation workflow (#163)
* Compact project relative paths from doc directory

* Remove committed example_list.md

- generate example_list from cmake for documentation

* Fix doxygen same-line comments

* Add workflow for generating documentation
2021-07-23 08:40:47 +02:00

20 lines
355 B
Bash
Executable File

#!/bin/bash
cd "$(dirname "$0")"
cd ..
# Add the license file.
files=$(find ./src ./include ./examples -name "*.hpp" -o -name "*.cpp")
for file in $files
do
if ! grep -q Copyright $file
then
cat $file ./tools/license_headers.cpp > $file.new && mv $file.new $file
fi
done
# Use clang-format.
for file in $files
do
clang-format -i $file
done