Variou details:

- Put the MIT copyright at the end.
- Move the directory /other -> tools
- Various improvements.
This commit is contained in:
ArthurSonzogni
2020-08-16 00:24:18 +02:00
committed by Arthur Sonzogni
parent 5a4afba66f
commit f2dc080a35
73 changed files with 353 additions and 322 deletions

27
tools/format.sh Executable file
View File

@@ -0,0 +1,27 @@
#!/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 ./other/license_headers.cpp > $file.new && mv $file.new $file
fi
done
# Use clang-format.
for file in $files
do
clang-format -i $file
done
exampleList="./doc/example_list.md"
echo "# Examples" > $exampleList
files=$(find ./examples/ -iname "*.cpp")
for f in $files
do
echo "@example $f" >> $exampleList
done

View File

@@ -0,0 +1,4 @@
// Copyright 2020 Arthur Sonzogni. All rights reserved.
// Use of this source code is governed by the MIT license that can be found in
// the LICENSE file.