Changeset 35865 for main/trunk


Ignore:
Timestamp:
2022-01-03T17:57:15+13:00 (2 years ago)
Author:
davidb
Message:

A JSON file of the same form can be in the import directory, so need to test that $d is a directory before processing

File:
1 edited

Legend:

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

    r35836 r35865  
    66cwd_without_prepare=${cwd%/*}
    77collection=${cwd_without_prepare##*/}
     8
     9full_collectdir=${cwd_without_prepare%/*}
    810
    911echo ""
     
    3335explode_metadata_database.pl \
    3436    -records_per_folder 2000 \
    35     -collectdir $GSDL3SRCHOME/web/sites/eurovision-lod/collect \
     37    -collectdir "$full_collectdir" \
    3638    -collection $collection \
    3739    -plugin_options "-metadata_merge_on_concat_fields Country,Year -OIDtype assigned -OIDmetadata Identifier" \
     
    6062     
    6163for d in ../import/sparqlresults-* ; do
    62     cat $tmp_cache/sparqlresults-local--esc-mir-gold/metadata.xml \
    63     | sed 's/mode="accumulate"/mode="override"/' > $d/metadata_esc_mir_gold.xml
    64     # add to this a few manually overridden metadata values
    65     /bin/cp metadata_esc_mir_gold__override.xml $d/.
     64    if [ -d "$d" ] ; then
     65    cat $tmp_cache/sparqlresults-local--esc-mir-gold/metadata.xml \
     66        | sed 's/mode="accumulate"/mode="override"/' > $d/metadata_esc_mir_gold.xml
     67    # add to this a few manually overridden metadata values
     68    /bin/cp metadata_esc_mir_gold__override.xml $d/.
     69    fi
    6670done
    6771
Note: See TracChangeset for help on using the changeset viewer.