Scheduled service maintenance on November 22


On Friday, November 22, 2024, between 06:00 CET and 18:00 CET, GIN services will undergo planned maintenance. Extended service interruptions should be expected. We will try to keep downtimes to a minimum, but recommend that users avoid critical tasks, large data uploads, or DOI requests during this time.

We apologize for any inconvenience.

sync 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #!/usr/bin/env bash
  2. #
  3. # Upload changes from inside repository using GIN CLI
  4. # Assumes no submodules
  5. # Assumes gin init was performed or the repository was downloaded via gin get
  6. if (( $# > 0 )); then
  7. echo "This script takes no arguments"
  8. exit 1
  9. fi
  10. checkerror() {
  11. err=$1
  12. msg=$2
  13. if [[ ${err} != 0 ]]; then
  14. echo ${msg} >> ./log/gin.log
  15. echo ${msg}
  16. echo "Press [Enter] to close this window"
  17. read
  18. exit 1
  19. fi
  20. }
  21. loc=$(dirname $0)
  22. projectdir=$(git -C ${loc} rev-parse --show-toplevel)
  23. pushd ${loc} > /dev/null
  24. mkdir -p ./log
  25. echo "$(date -Iseconds): Sync script executed" >> ./log/gin.log
  26. gin sync
  27. checkerror $? "Error occurred during 'gin sync'"
  28. gin commit .
  29. checkerror $? "Error occurred during 'gin commit'"
  30. gin upload
  31. checkerror $? "Error occurred during 'gin upload'"
  32. # this is removing big file content if the upload is successful:
  33. gin remove-content
  34. checkerror $? "Error occurred during 'gin remove-content'"
  35. # Uncomment the two lines below to download all large files, you may also want to comment the gin remove-content line above
  36. # gin get-content .
  37. # checkerror $? "Error occurred during 'gin get-content'"
  38. popd > /dev/null