make_redirects.sh 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #!/bin/bash
  2. set -e
  3. rm -rf public
  4. mkdir public
  5. redirect() {
  6. dir=$(dirname "public$1")
  7. mkdir -p $dir
  8. cp misc/redirect.html "public$1"
  9. url=${1/\/index.html/\/}
  10. sed -i "s|URL|$url|g" "public$1"
  11. }
  12. redirect /inventory/index.html
  13. redirect /definition-tables/index.html
  14. redirect /aliases/index.html
  15. redirect /items/index.html
  16. redirect /registered-definitions/index.html
  17. redirect /colors/index.html
  18. redirect /decoration-types/index.html
  19. redirect /hud/index.html
  20. redirect /index.html
  21. redirect /spatial-vectors/index.html
  22. redirect /metadata/index.html
  23. redirect /perlin-noise/index.html
  24. redirect /translations/index.html
  25. redirect /tool-capabilities/index.html
  26. redirect /l-system-trees/index.html
  27. redirect /entity-damage-mechanism/index.html
  28. redirect /escape-sequences/index.html
  29. redirect /registered-entities/index.html
  30. redirect /flag-specifier-format/index.html
  31. redirect /minetest-namespace-reference/index.html
  32. redirect /ores/index.html
  33. redirect /search.html
  34. redirect /representations-of-simple-things/index.html
  35. redirect /nodes/index.html
  36. redirect /lua-voxel-manipulator/index.html
  37. redirect /helper-functions/index.html
  38. redirect /formspec/index.html
  39. redirect /games/index.html
  40. redirect /sounds/index.html
  41. redirect /textures/index.html
  42. redirect /map-terminology-and-coordinates/index.html
  43. redirect /schematics/index.html
  44. redirect /groups/index.html
  45. redirect /privileges/index.html
  46. redirect /class-reference/index.html
  47. redirect /mods/index.html
  48. redirect /mapgen-objects/index.html