020_sections 715 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. #!/bin/sh
  2. echo "Creating default sections"
  3. set -e
  4. set -u
  5. SECTIONS="admin
  6. cli-mono
  7. comm
  8. database
  9. debian-installer
  10. debug
  11. devel
  12. doc
  13. editors
  14. education
  15. electronics
  16. embedded
  17. fonts
  18. games
  19. gnome
  20. gnu-r
  21. gnustep
  22. graphics
  23. hamradio
  24. haskell
  25. httpd
  26. interpreters
  27. introspection
  28. java
  29. javascript
  30. kde
  31. kernel
  32. libdevel
  33. libs
  34. lisp
  35. localization
  36. mail
  37. math
  38. metapackages
  39. misc
  40. net
  41. news
  42. ocaml
  43. oldlibs
  44. otherosfs
  45. perl
  46. php
  47. python
  48. ruby
  49. rust
  50. science
  51. shells
  52. sound
  53. tasks
  54. tex
  55. text
  56. utils
  57. vcs
  58. video
  59. web
  60. x11
  61. xfce
  62. zope"
  63. values=""
  64. for prefix in "" "contrib/" "non-free/"; do
  65. for section in ${SECTIONS}; do
  66. values="${values:+${values},} ('${prefix}${section}')"
  67. done
  68. done
  69. psql -c "INSERT INTO section (section) VALUES ${values}" >/dev/null