Project

General

Profile

1
#!/bin/sh
2
# Test-scrubs the test taxonomic names
3

    
4
selfDir="$(dirname -- "$0")"
5
selfDirName="$(basename -- "$selfDir")"
6

    
7
cd "$selfDir/../.."
8

    
9
# Import names
10
make inputs/.TNRS/reinstall # asks user for confirmation
11
# Must come after TNRS reinstall to recreate tnrs_input_name view
12
make schemas/public/reinstall # asks user for confirmation
13
make inputs/"$selfDirName"/import log=
14
for iter in match_input_names parse_accepted_names; do
15
    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

    
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
public=public."$selfDirName"
27
make schemas/"$public"/uninstall
28
make schemas/rename/"$public"
29
make backups/"$public".sql-remake
30
mv -f backups/"$public".sql "$selfDir/_scrub"
(3-3/3)