Added more messages

This commit is contained in:
Kevin Veen-Birkenbach 2023-12-01 14:21:35 +01:00
parent 2949e09aee
commit 3cad6aa0bb

View File

@ -15,8 +15,12 @@ for SUBDIR in "$MAIN_DIRECTORY"/*; do
# Only proceed if it is a directory
if [ -d "$SUBDIR" ]; then
echo "Validating directory: $SUBDIR"
# Only proceed if the specified trigger directory does not exist within the subdirectory
if [ ! -d "$SUBDIR/$TRIGGER_DIR" ]; then
FULL_TRIGGER_DIR_PATH="$SUBDIR/$TRIGGER_DIR"
if [ ! -d "$FULL_TRIGGER_DIR_PATH" ]; then
echo "Validation: error"
echo "Missing directory: $FULL_TRIGGER_DIR_PATH"
# Display the subdirectory contents
echo "Contents of subdirectory: $SUBDIR"
ls "$SUBDIR"
@ -31,7 +35,8 @@ for SUBDIR in "$MAIN_DIRECTORY"/*; do
rm -vrf "$SUBDIR"
fi
else
echo "$SUBDIR contains $TRIGGER_DIR."
echo "Validation: ok"
echo "$SUBDIR contains $FULL_TRIGGER_DIR_PATH."
fi
fi
done