Fix: improvement to handle dirs with spaces

This commit is contained in:
Emmanuel Engelhart 2022-10-01 21:15:50 +02:00
parent f61fc07121
commit ffbda34b75
No known key found for this signature in database
GPG Key ID: 120B30D020B553D3
1 changed files with 2 additions and 1 deletions

View File

@ -3,9 +3,10 @@
# Compute 'src' path
SCRIPT_DIR=$(dirname "$0")
REPO_DIR=$(readlink -f "$SCRIPT_DIR"/..)
DIRS="$REPO_DIR/src $REPO_DIR/include"
DIRS="src include"
# Apply formating to all *.cpp and *.h files
cd "$REPO_DIR"
for FILE in $(find $DIRS -name '*.h' -o -name '*.cpp')
do
echo $FILE