Project

General

Profile

« Previous | Next » 

Revision 6946

import_all: Run the import directly into a new, already-versioned public schema. This removes the need to manually rename the schema after import, and allows the backup commands to use the stored $version shell variable to refer to the last import.

View differences:

bin/import_all
8 8
    cd "$selfDir/.."
9 9
    
10 10
    if test "${BASH_LINENO[1]}" = 0; then # was run without initial "."
11
        echo "Usage: . $self [vars...] (note initial \".\")"|fold -s >&2
11
        echo "Usage: [version=...;] . $self [vars...] (note initial \".\")"\
12
        |fold -s >&2
12 13
        return 2
13 14
    fi
15
    : ${version=$(make -s version)}
16
    export version
14 17
    
15 18
    make inputs/.TNRS/tnrs_accepted/reinstall
16 19
    make inputs/.TNRS/tnrs_other/reinstall
17 20
    
21
    make schemas/$version/install
22
    
18 23
    all=1; . "$selfDir/with_all" Source/import by_col=1 "$@"
19 24
        # note that this isn't affected by $import_source
20 25
    wait # wait for asynchronous commands
README.TXT
53 53
    If many inputs have errors, discard the current (partial) import:
54 54
        make schemas/public/reinstall
55 55
    Otherwise, continue
56
    Determine the import name:
57
        bin/import_name inputs/{.,}*/*/logs/*.<version>[.-]*log.sql
58
    Archive the last import: make schemas/rename/<version>
59 56
    Delete previous imports so they won't bloat the full DB backup:
60 57
        make backups/vegbien.<version>.backup/remove
61 58
    make backups/TNRS.backup-remake &

Also available in: Unified diff