summaryrefslogtreecommitdiff
path: root/scripts/get-metadata.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/get-metadata.sh')
-rwxr-xr-xscripts/get-metadata.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/get-metadata.sh b/scripts/get-metadata.sh
index 78e68514..957d427b 100755
--- a/scripts/get-metadata.sh
+++ b/scripts/get-metadata.sh
@@ -34,7 +34,11 @@ entityid=`echo "$metadata" | sed -n 's/.*entityID=['\''"]\([^"]*\)['\''"].*/\1/p
entityidfn=`echo "$entityid" | sed 's;https*://;;' | tr 'A-Z' 'a-z' | sed 's;/$;;' | sed 's/[^a-z0-9_.-]/-/g' | sed 's/\.xml$//;s/$/.xml/'`
[ -n "$entityidfn" ] || error "Failed to generate filename from entityid $entityid"
-echo -n "Save metadata into $entityidfn [Y/n]? "
+if [ -r "$entityidfn" ] ; then
+ echo -n "Replace $entityidfn with metadata [Y/n]? "
+else
+ echo -n "Save metadata into $entityidfn [Y/n]? "
+fi
read x
case $x in
Y|y|"")