Peng Ding commited on
Commit
59251f5
1 Parent(s): 8acd1c2

include file checker

Browse files
Files changed (1) hide show
  1. missing_file.sh +21 -0
missing_file.sh ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+
3
+ partial_filename=".anno2code.json"
4
+ directories=$(find . -mindepth 1 -maxdepth 1 -type d)
5
+
6
+ # count how many folders in this dir
7
+ count=$(echo $directories | wc -w)
8
+
9
+ if [ $count -eq 0 ]; then
10
+ echo "No directories found."
11
+ exit 1
12
+ else
13
+ echo "Found $count directories:"
14
+ echo $directories
15
+ fi
16
+
17
+ for dir in $directories; do
18
+ if [ ! -e "$dir"/*"$partial_filename" ]; then
19
+ echo "Directory '$dir' does not contain a file matching '$partial_filename'."
20
+ fi
21
+ done