generated from NASA-PDS/template-repo-java
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #332 from NASA-PDS/i331
Add sync script and update identifier handling
- Loading branch information
Showing
2 changed files
with
52 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#!/bin/bash | ||
|
||
while [[ $# -gt 0 ]]; do | ||
case $1 in | ||
-h|--help) | ||
echo "sync_dois.sh [-h|--help] [-p|--prefix <doi_prefix>] [-s|--submitter <submitter email>]" | ||
exit 0 | ||
;; | ||
-p|--prefix) | ||
PREFIX="$2" | ||
shift | ||
shift | ||
;; | ||
-s|--submitter) | ||
SUBMITTER="$2" | ||
shift | ||
shift | ||
;; | ||
*) | ||
echo "Unknown option $1" | ||
exit 1 | ||
;; | ||
esac | ||
done | ||
|
||
if [[ -z ${PREFIX} ]]; then | ||
PREFIX="10.17189" | ||
fi | ||
|
||
if [[ -z ${SUBMITTER} ]]; then | ||
SUBMITTER="[email protected]" | ||
fi | ||
|
||
echo "==================================================" | ||
echo "Starting DOI sync for $(date)" | ||
echo | ||
echo "PREFIX=${PREFIX}" | ||
echo "SUBMITTER=${SUBMITTER}" | ||
|
||
source /home/pds4/pds-doi-service/bin/activate | ||
|
||
pds-doi-init --service datacite --prefix ${PREFIX} --submitter ${SUBMITTER} | ||
|
||
echo "Sync complete" | ||
echo | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters