You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

35 line
863 B

  1. #!/bin/bash
  2. set -euo pipefail
  3. if [[ ! -d "$1" ]] ; then
  4. echo "Target directory $1 does not exist!"
  5. exit
  6. fi
  7. set -x
  8. cd "$1"
  9. upload="$(basename "$(pwd)")"
  10. export CUR_SIZE=$( du -B1 -s . | grep -oE "^[0-9]+" )
  11. export YEAR=$(date +%Y)
  12. echo ia upload "archiveteam_archivebot_go_${upload}" * \
  13. --sleep=120 \
  14. --retries=100 \
  15. --metadata="noarchivetorrent:true" \
  16. --metadata="size-hint:${CUR_SIZE}" \
  17. --metadata="mediatype:web" \
  18. --metadata="description:ArchiveBot is an Archive Team service to quickly grab smaller at-risk or critical sites to bring copies into the Internet Archive Wayback machine." \
  19. --metadata="title: Archiveteam: Archivebot GO Pack ${upload}" \
  20. --metadata="collection:archivebot" \
  21. --metadata="creator:Archive Team" \
  22. --metadata="date:${YEAR}" \
  23. --checksum \
  24. --verify \
  25. --delete
  26. # TEST SLEEP
  27. sleep 6000
  28. cd ..
  29. echo rmdir "$upload"