Changeset 34867
- Timestamp:
- 2021-02-15T22:36:05+13:00 (3 years ago)
- Location:
- main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/prepare
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/prepare/02-EXPLODE-SPARQLRESULTS-TO-IMPORT.sh
r34866 r34867 1 1 #!/bin/bash 2 2 3 if [ ! -d tmp ] ; then 4 echo "Making temporary directory: tmp" 5 mkdir tmp 3 tmp_cache="tmp-cache" 4 5 echo "" 6 7 if [ "x$GSDL3SRCHOME" = "x" ] ; then 8 echo "Environment variable GSDL3SRCHOME not set." 1>&2 9 echo "Have you sourced ./gs3-setup.sh?" 1>&2 10 exit 1 11 fi 12 13 if [ ! -d $tmp_cache ] ; then 14 echo "Making temporary directory:" 15 echo " $tmp_cache" 16 mkdir $tmp_cache 17 else 18 echo "Removing existing content from:" 19 echo " $tmp_cache" 20 /bin/rm -rf $tmp_cache/* 6 21 fi 7 22 8 echo "C reating temporary copies:"23 echo "Copying to '$tmp_cache' then exploding:" 9 24 10 25 for f in "local--countries-in-esc-by-year-after-1956--with-errata.json" ; do 11 26 12 echo " errata-lod/$f -> tmp/sparqlresults-$f" 13 /bin/cp "errata-lod/$f" "tmp/sparqlresults-$f" 27 echo " errata-lod/$f -> $tmp_cache/sparqlresults-$f" 28 /bin/cp "errata-lod/$f" "$tmp_cache/sparqlresults-$f" 29 30 # rm -rf tmp/sparqlresults-local--countries-in-esc-by-year-after-1956--with-errata.* && cp import/sparqlresults-local--countries-in-esc-by-year-after-1956--with-errata.json tmp/. 31 32 explode_metadata_database.pl \ 33 -collectdir $GSDL3SRCHOME/web/sites/eurovision-lod/collect \ 34 -collection eurovision \ 35 -plugin_options "-metadata_merge_on_concat_fields Country,Year -OIDtype assigned -OIDmetadata Identifier" \ 36 -plugin JSONSPARQLResultPlugin \ 37 $tmp_cache/sparqlresults-$f 38 39 # -use_collection_plugin_options \ 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 14 46 done 15 16 echo "Regenerating sparqlresults-* files in '../import' (from exploded results in 'tmp')" 47 48 echo "" 49 echo "Regenerating sparqlresults-* files in '../import' (from exploded results in '$tmp_cache')" 17 50 18 51 /bin/rm -rf ../import/sparqlresults-* 19 /bin/mv tmp/sparqlresults-* ../import/.52 /bin/mv $tmp_cache/sparqlresults-* ../import/. 20 53 21 54 echo "" -
main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/prepare/05-COPY-VOTING-METADATA-TO-IMPORT.sh
r34865 r34867 2 2 3 3 4 echo "" 4 5 echo "Copying:" 5 6 … … 12 13 13 14 15 echo "" 14 16 15 17
Note:
See TracChangeset
for help on using the changeset viewer.