Changeset 35083


Ignore:
Timestamp:
2021-04-17T10:22:00+12:00 (3 years ago)
Author:
davidb
Message:

collection name now determined dynamically; code tidy up

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/prepare/02-EXPLODE-SPARQLRESULTS-TO-IMPORT.sh

    r35081 r35083  
    22
    33tmp_cache="tmp-cache"
     4
     5cwd=`pwd`
     6cwd_without_prepare=${cwd%/*}
     7collection=${cwd_without_prepare##*/}
    48
    59echo ""
     
    2327echo "Copying to '$tmp_cache' then exploding:"
    2428
    25 #for f in \
    26 #    "local--countries-in-esc-by-year-in-1956--with-errata.json" \
    27 #    "local--countries-in-esc-by-year-after-1956--with-errata.json" \
    28 #    ; do
     29f="local--countries-in-esc-by-year-in-1956--with-errata.json"
     30echo "  errata-lod/$f -> $tmp_cache/sparqlresults-$f"   
     31/bin/cp "errata-lod/$f" "$tmp_cache/sparqlresults-$f"
    2932
    30     f="local--countries-in-esc-by-year-in-1956--with-errata.json"
    31     echo "  errata-lod/$f -> $tmp_cache/sparqlresults-$f"   
    32     /bin/cp "errata-lod/$f" "$tmp_cache/sparqlresults-$f"
     33explode_metadata_database.pl \
     34    -collectdir $GSDL3SRCHOME/web/sites/eurovision-lod/collect \
     35    -collection $collection \
     36    -plugin_options "-metadata_merge_on_concat_fields Country,Year,TitleDisambiguation -OIDtype assigned -OIDmetadata Identifier" \
     37    -plugin JSONSPARQLResultPlugin  \
     38    $tmp_cache/sparqlresults-$f
    3339
    34     explode_metadata_database.pl \
    35       -collectdir $GSDL3SRCHOME/web/sites/eurovision-lod/collect \
    36       -collection eurovision \
    37       -plugin_options "-metadata_merge_on_concat_fields Country,Year,TitleDisambiguation -OIDtype assigned -OIDmetadata Identifier" \
    38       -plugin JSONSPARQLResultPlugin  \
    39       $tmp_cache/sparqlresults-$f
    40 
    41     if [ $? != 0 ] ; then
    42     echo "Error encountered when exploding:" 1>&2
    43     echo "  $tmp_cache/sparqlresults-$f" 1>&2
    44     exit 1
    45     fi
     40if [ $? != 0 ] ; then
     41    echo "Error encountered when exploding:" 1>&2
     42    echo "  $tmp_cache/sparqlresults-$f" 1>&2
     43    exit 1
     44fi
    4645
    4746
    48     f="local--countries-in-esc-by-year-after-1956--with-errata.json"
    49     echo "  errata-lod/$f -> $tmp_cache/sparqlresults-$f"   
    50     /bin/cp "errata-lod/$f" "$tmp_cache/sparqlresults-$f"
     47f="local--countries-in-esc-by-year-after-1956--with-errata.json"
     48echo "  errata-lod/$f -> $tmp_cache/sparqlresults-$f"   
     49/bin/cp "errata-lod/$f" "$tmp_cache/sparqlresults-$f"
    5150
    52     explode_metadata_database.pl \
    53       -collectdir $GSDL3SRCHOME/web/sites/eurovision-lod/collect \
    54       -collection eurovision \
    55       -plugin_options "-metadata_merge_on_concat_fields Country,Year -OIDtype assigned -OIDmetadata Identifier" \
    56       -plugin JSONSPARQLResultPlugin  \
    57       $tmp_cache/sparqlresults-$f
     51explode_metadata_database.pl \
     52    -collectdir $GSDL3SRCHOME/web/sites/eurovision-lod/collect \
     53    -collection $collection \
     54    -plugin_options "-metadata_merge_on_concat_fields Country,Year -OIDtype assigned -OIDmetadata Identifier" \
     55    -plugin JSONSPARQLResultPlugin  \
     56    $tmp_cache/sparqlresults-$f
    5857
    59     if [ $? != 0 ] ; then
    60     echo "Error encountered when exploding:" 1>&2
    61     echo "  $tmp_cache/sparqlresults-$f" 1>&2
    62     exit 1
    63     fi   
    64 #done
     58if [ $? != 0 ] ; then
     59    echo "Error encountered when exploding:" 1>&2
     60    echo "  $tmp_cache/sparqlresults-$f" 1>&2
     61    exit 1
     62fi   
    6563
    6664echo ""
Note: See TracChangeset for help on using the changeset viewer.