File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,23 @@ test_dependencies() {
2828 test_dep " find"
2929}
3030
31+ test_repository_structure () {
32+ cd " ${ROOTDIR} "
33+ if [ ! -d " Repository" ]; then
34+ print_clr ${ERROR} " Repository is missing expected 'Repository' folder"
35+ exit 104
36+ fi
37+ while read LINE; do
38+ if ! [[ " $LINE " =~ ^Repository/[0-9]([.][0-9]){3}(/[^/]+){2}/[^/]+json$ ]]; then
39+ error=$?
40+ print_clr ${ERROR} " FAIL: Invalid path ${LINE} "
41+ fi
42+ done < <( find Repository/ -iname ' *.json' -type f)
43+
44+ [ ! -z " $error " ] && exit $error
45+ print_clr ${SUCCESS} " SUCCESS: Repository directory structure"
46+ }
47+
3148check_sha256 () {
3249 [ " $# " -ne 2 ] && exit 103;
3350
@@ -54,6 +71,7 @@ validate() {
5471}
5572
5673test_dependencies
74+ test_repository_structure
5775
5876for file in ${ROOTDIR} /** ; do
5977 [ " ${file: -5} " == " .json" ] && validate " ${file} "
You can’t perform that action at this time.
0 commit comments