We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ca92e31 commit 73e1f5aCopy full SHA for 73e1f5a
1 file changed
scripts/prune-extra-keep-files.sh
@@ -0,0 +1,12 @@
1
+#!/usr/bin/env bash
2
+
3
+for EXERCISE_DIRECTORY in $(find exercises -mindepth 2 -maxdepth 2 -type d -name "src"); do
4
+ STARTER_DIRECTORY="${EXERCISE_DIRECTORY}/main/java"
5
+ STARTER_FILE_COUNT=$(find "${STARTER_DIRECTORY}" -mindepth 1 -maxdepth 1 -type f -name "*.java" | wc -l)
6
+ KEEP_FILE_LOCATION="${STARTER_DIRECTORY}/.keep"
7
8
+ if (( ${STARTER_FILE_COUNT} > 0 )) && [[ -f "${KEEP_FILE_LOCATION}" ]]; then
9
+ echo "Removing unnecessary keep file ${KEEP_FILE_LOCATION}..."
10
+ rm "${KEEP_FILE_LOCATION}"
11
+ fi
12
+done
0 commit comments