# HG changeset patch # User Chris Cannam # Date 1407416733 -3600 # Node ID 6a072a24fed825d700eaec1f7ec919837dba4eb6 # Parent 0036098a5edbf4d2dd981e1de22ecea0fee1287f Test for some accompanying files diff -r 0036098a5edb -r 6a072a24fed8 SCRIPTS/process.sh --- a/SCRIPTS/process.sh Thu Aug 07 13:37:13 2014 +0100 +++ b/SCRIPTS/process.sh Thu Aug 07 14:05:33 2014 +0100 @@ -438,7 +438,29 @@ echo "NOTE: multiple .ttl or .n3 files found in $dir" | tee -a "$log" fi done - if [ "$first" = "yes" ]; then good=no; fi + if [ "$first" = "yes" ]; then + good=no; + else + echo "GOOD: found one or more .ttl or .n3 files (we don't actually test their validity or content here though)" | tee -a "$log" + fi + [ "$good" = "yes" ] +} + +env_test_accompaniments() { + dir="$1" + log=$(logfile_for envtest "$dir") + good=yes + if ! ls -1 "$dir" | egrep -qi "^readme(.txt|)$"; then + echo "ERROR: no README file found" | tee -a "$log" + good=no + fi + if ! ls -1 "$dir" | egrep -qi "^(copying|licen[cs]e)(.txt|)$"; then + echo "ERROR: no COPYING or LICEN[CS]E file found" | tee -a "$log" + good=no + fi + if ! ls -1 "$dir" | egrep -qi "^citation(.txt|)$"; then + echo "NOTE: no CITATION file found" | tee -a "$log" + fi [ "$good" = "yes" ] } @@ -447,7 +469,7 @@ log=$(logfile_for envtest "$dir") allgood=yes cat /dev/null > "$log" - for test in exports stdout cat ttl; do + for test in exports stdout cat ttl accompaniments; do "env_test_$test" "$dir" || allgood=no done if [ "$allgood" != "yes" ]; then