Project

General

Profile

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

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

    
7
unset n
8

    
9
cd "$selfDir/../.."
10

    
11
# Import names
12
make inputs/.TNRS/reinstall schema_only=1 # asks user for confirmation
13
# Must come after TNRS reinstall to recreate tnrs_input_name view
14
make schemas/public/reinstall # asks user for confirmation
15
make inputs/"$selfDirName"/import log=
16
make inputs/.TNRS/tnrs/tnrs-remake log=
17
yes|make schemas/public/reinstall
18
make inputs/.TNRS/import log=
19
make inputs/"$selfDirName"/import log=
20

    
21
# Export results
22
# Don't overwrite TNRS.backup, which contains the full TNRS cache
23
make backups/TNRS.sql-remake
24
mv -f backups/TNRS.sql "$selfDir/_scrub"
25
public=public."$selfDirName"
26
make schemas/"$public"/uninstall # remove previous results
27
make schemas/rename/"$public"
28
make backups/"$public".sql-remake
29
mv -f backups/"$public".sql "$selfDir/_scrub"
30
rm=1 inputs/.TNRS/data.sql.run export_
(6-6/6)