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 lines
922 B

  1. #!/bin/bash
  2. set -euo pipefail
  3. export IA_CONFIG_FILE="${IA_CONFIG_FILE:-/ia.ini}"
  4. if [[ ! -d "$1" ]] ; then
  5. echo "Target directory $1 does not exist!"
  6. exit
  7. fi
  8. set -x
  9. cd "$1"
  10. export upload="$(basename "$(pwd)")"
  11. export CUR_SIZE=$( du -B1 -s . | grep -oE "^[0-9]+" )
  12. export YEAR=$(date +%Y)
  13. ia upload "archiveteam_archivebot_go_${upload}" * \
  14. --size-hint="${CUR_SIZE}" \
  15. --sleep=120 \
  16. --retries=100 \
  17. --metadata="noarchivetorrent:true" \
  18. --metadata="size-hint:${CUR_SIZE}" \
  19. --metadata="mediatype:web" \
  20. --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." \
  21. --metadata="title:Archiveteam: Archivebot GO Pack ${upload}" \
  22. --metadata="collection:archivebot" \
  23. --metadata="creator:Archive Team" \
  24. --metadata="date:${YEAR}" \
  25. --checksum \
  26. --verify \
  27. --delete
  28. cd ..
  29. rmdir "$upload"