Project

General

Profile

1 5414 aaronmk
#!/bin/sh
2
# Test-scrubs the test taxonomic names
3
4
selfDir="$(dirname -- "$0")"
5
selfDirName="$(basename -- "$selfDir")"
6
7
cd "$selfDir/../.."
8
9 5423 aaronmk
# Import names
10 5414 aaronmk
make inputs/.TNRS/reinstall # asks user for confirmation
11 5668 aaronmk
# Must come after TNRS reinstall to recreate tnrs_input_name view
12 5414 aaronmk
make schemas/public/reinstall # asks user for confirmation
13
make inputs/"$selfDirName"/import log=
14 5422 aaronmk
for iter in match_input_names parse_accepted_names; do
15 5414 aaronmk
    make inputs/.TNRS/tnrs/tnrs-remake log=
16
    yes|make schemas/public/reinstall
17
    make inputs/.TNRS/cleanup
18
    make inputs/.TNRS/import log=
19
    make inputs/"$selfDirName"/import log=
20
done
21 5423 aaronmk
22
# Export results
23
# Don't overwrite TNRS.backup, which contains the full TNRS cache
24
make backups/TNRS.sql-remake
25
mv -f backups/TNRS.sql "$selfDir/_scrub"
26 5680 aaronmk
public=public."$selfDirName"
27 5681 aaronmk
make schemas/"$public"/uninstall
28 5680 aaronmk
make schemas/rename/"$public"
29
make backups/"$public".sql-remake
30
mv -f backups/"$public".sql "$selfDir/_scrub"