Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9123214
update-deposit-with-another-archive.sh
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
582 B
Subscribers
None
update-deposit-with-another-archive.sh
View Options
#!/usr/bin/env bash
.
./default-setup
DEPOSIT_ID
=
${
1
-1
}
ARCHIVE
=
${
2
-
'../../swh-core.zip'
}
NAME
=
$(
basename
${
ARCHIVE
}
)
MD5
=
$(
md5sum
${
ARCHIVE
}
|
cut
-f
1
-d
' '
)
PROGRESS
=
${
3
-
'false'
}
curl
-i
-u
"
${
CREDS
}
"
\
-X
POST
\
--data-binary
@
${
ARCHIVE
}
\
-H
"In-Progress:
${
PROGRESS
}
"
\
-H
"Content-MD5:
${
MD5
}
"
\
-H
"Content-Disposition: attachment; filename=
${
NAME
}
"
\
-H
'Slug: external-id-2'
\
-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
Sat, Jun 21, 5:10 PM (1 w, 6 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3240058
Attached To
rDDEP Push deposit
Event Timeline
Log In to Comment