diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/get-metadata.sh | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/scripts/get-metadata.sh b/scripts/get-metadata.sh index 1a4af53e..89e33bab 100755 --- a/scripts/get-metadata.sh +++ b/scripts/get-metadata.sh @@ -35,6 +35,7 @@ if test -d swamid-2.0 ; then echo "$script_cwd" | grep -q ^/ || script_cwd=../$script_cwd fi +update_xml=true if echo "$metadataurl" | grep -qE '^http://|^https://' ; then metadata=`curl -L -s -k -f "$metadataurl"` elif echo "$metadataurl" | grep -qE '^reep:' ; then @@ -48,6 +49,7 @@ else case $metadataurl in [0-9][0-9]*) urls="https://metadata.swamid.se/?rawXML=${metadataurl}" + update_xml=false ;; http*) urls="$metadataurl" @@ -100,9 +102,11 @@ case $x in fi echo "$metadata" > $entityidfn - tmp=`mktemp` - xsltproc --stringparam regDate "$regdate" $script_cwd/../xslt/add-rpi.xsl ${entityidfn} > ${tmp} && mv ${tmp} ${entityidfn} - xsltproc $script_cwd/../xslt/clean-entitydescriptor.xsl ${entityidfn} > ${tmp} && mv ${tmp} ${entityidfn} + if $update_xml ; then + tmp=`mktemp` + xsltproc --stringparam regDate "$regdate" $script_cwd/../xslt/add-rpi.xsl ${entityidfn} > ${tmp} && mv ${tmp} ${entityidfn} + xsltproc $script_cwd/../xslt/clean-entitydescriptor.xsl ${entityidfn} > ${tmp} && mv ${tmp} ${entityidfn} + fi if $new ; then echo -n "Add swamid-2.0/$entityidfn to git [Y/n]? " |