diff --git a/Scripts/swiftformat.sh b/Scripts/swiftformat.sh index 16c5f5e07..9cfb2403a 100755 --- a/Scripts/swiftformat.sh +++ b/Scripts/swiftformat.sh @@ -1,5 +1,12 @@ #! /bin/sh +# Check if the folder name is exactly "LoopFollow" +FOLDER_NAME=$(basename "${SRCROOT}") +if [ "${FOLDER_NAME}" != "LoopFollow" ]; then + echo "Skipping swiftformat: This script only runs in the LoopFollow directory, not in '${FOLDER_NAME}'" + exit 0 +fi + function assertEnvironment { if [ -z $1 ]; then echo $2