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 schema_only=1 # 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/tnrs_accepted/reinstall
18
    make inputs/.TNRS/tnrs_other/reinstall
19
    make inputs/.TNRS/import log=
20
    make inputs/"$selfDirName"/import log=
21
done
22

    
23
# Export results
24
# Don't overwrite TNRS.backup, which contains the full TNRS cache
25
make backups/TNRS.sql-remake
26
mv -f backups/TNRS.sql "$selfDir/_scrub"
27
public=public."$selfDirName"
28
make schemas/"$public"/uninstall
29
make schemas/rename/"$public"
30
make backups/"$public".sql-remake
31
mv -f backups/"$public".sql "$selfDir/_scrub"
(3-3/3)