Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9344224
replace-deposit-archive.sh
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
551 B
Subscribers
None
replace-deposit-archive.sh
View Options
#!/usr/bin/env bash
.
./default-setup
ARCHIVE
=
${
1
-
'../../swh-model.zip'
}
NAME
=
$(
basename
${
ARCHIVE
}
)
MD5
=
$(
md5sum
${
ARCHIVE
}
|
cut
-f
1
-d
' '
)
DEPOSIT_ID
=
${
2
-1
}
curl
-i
-u
"
$CREDS
"
\
-X
PUT
\
--data-binary
@
${
ARCHIVE
}
\
-H
"In-Progress: false"
\
-H
"Content-MD5:
${
MD5
}
"
\
-H
"Content-Disposition: attachment; filename=
${
NAME
}
"
\
-H
'Slug: external-id'
\
-H
'Packaging: http://purl.org/net/sword/package/SimpleZip'
\
-H
'Content-type: application/zip'
\
${
SERVER
}
/1/
${
COLLECTION
}
/
${
DEPOSIT_ID
}
/media/
File Metadata
Details
Attached
Mime Type
text/x-shellscript
Expires
Fri, Jul 4, 2:14 PM (6 h, 41 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3240016
Attached To
rDDEP Push deposit
Event Timeline
Log In to Comment