Skip to content
This repository was archived by the owner on Jun 28, 2024. It is now read-only.

Commit 734b167

Browse files
authored
Merge pull request #738 from GabyCT/topic/checksubidir
metrics: Check subdir exists while running makereport script
2 parents ad6525d + 19786ee commit 734b167

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

metrics/report/makereport.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ GUESTINPUTDIR="/inputdir/"
2323
GUESTOUTPUTDIR="/outputdir/"
2424

2525
setup() {
26+
echo "Checking subdirectories"
27+
check_subdir="$(cd ${HOSTINPUTDIR}; ls -dx */ > /dev/null 2>&1 | wc -l)"
28+
if [ $check_subdir -eq 0 ]; then
29+
die "Subdirectory not found at metrics/results to store JSON results"
30+
fi
31+
2632
echo "Checking Dockerfile"
2733
check_dockerfiles_images "$IMAGE" "$DOCKERFILE"
2834

0 commit comments

Comments
 (0)