Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
galaxyproject
GitHub Repository: galaxyproject/training-material
Path: blob/main/bin/check-file-sizes.sh
1677 views
1
#!/bin/bash
2
3
echo "checking file sizes"
4
exitcode=0
5
# check that test_data folder for workflows do not exceed 10MB
6
7
for TEST_DATA in topics/*/tutorials/*/workflows/test-data; do
8
9
if [[ $(du -sb $TEST_DATA | cut -f1) -gt 10485760 ]]; then
10
if [[ $exitcode -eq 0 ]]; then
11
echo "ERROR: test-data folder may not exceed 10MB."
12
echo " To reduce size, please use zenodo links for files (and replace 'path:' with 'location:'). And consider replacing output files with asserts"
13
fi
14
echo " Folder too big: $(du -sh $TEST_DATA)"
15
exitcode=1
16
fi
17
18
done
19
20
exit $exitcode
21
22