make 524 B

12345678910111213141516171819202122232425262728293031
  1. #!/bin/sh
  2. #
  3. # Genera la cápsula de PlanetaLibre.
  4. #
  5. # shellcheck disable=1091
  6. [ -r /etc/profile ] && . /etc/profile
  7. mkdir -p docs
  8. (cd site && find . -type f -name \*.gemini) |
  9. while IFS= read -r file; do
  10. file=${file#./}
  11. (
  12. head -n -1 header.gemini
  13. cat "site/${file}"
  14. printf '\n'
  15. cat footer.gemini
  16. ) > "docs/${file}"
  17. done
  18. planetalibre \
  19. --domain reisub.nsupdate.info/planetalibre \
  20. --output docs
  21. ncftpput \
  22. -t 8 \
  23. -f "${HOME}/ncftp/planetalibre-login.cfg" \
  24. -R / docs/.