dejavu-fonts 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. #!/usr/bin/env bash
  2. # Copyright (C) 2016 Paul Kocialkowski <contact@paulk.fr>
  3. #
  4. # This program is free software: you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation, either version 3 of the License, or
  7. # (at your option) any later version.
  8. #
  9. # This program is distributed in the hope that it will be useful,
  10. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. # GNU General Public License for more details.
  13. #
  14. # You should have received a copy of the GNU General Public License
  15. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. arguments() {
  17. project_arguments_targets "$project" "$@"
  18. }
  19. dependencies() {
  20. project_dependencies "$project" "$@"
  21. }
  22. dependencies_check() {
  23. project_dependencies_check "$project" "$@"
  24. }
  25. usage() {
  26. project_usage_actions "$project"
  27. project_usage_arguments "$project" "$@"
  28. }
  29. download() {
  30. local repository="$project"
  31. local sources_path="$(project_sources_path "$project" "$repository" "$@")"
  32. local ucd_version="$(dejavu_fonts_ucd_version "$UNICODE" "$@")"
  33. local ucd_files_path="$(dejavu_fonts_ucd_files_path "$UNICODE" "$@")"
  34. local -a download_list
  35. local -a ucd_files
  36. mapfile -t ucd_files < "$ucd_files_path"
  37. for file in "${ucd_files[@]}"; do
  38. download_list+=("https://www.unicode.org/Public/$ucd_version/ucd/$file")
  39. done
  40. project_download_git "$project" "$repository" https://github.com/dejavu-fonts/dejavu-fonts.git "$@"
  41. download_wrapper "$sources_path/resources" "${download_list[@]}"
  42. # Create a symlink to fontconfig's orthography files
  43. ln -fs ../../fontconfig/fc-lang "$sources_path/resources/fc-lang"
  44. }
  45. download_check() {
  46. local repository="$project"
  47. project_download_check_git "$project" "$repository" "$@"
  48. }
  49. extract() {
  50. local repository="$project"
  51. project_extract "$project" "$@"
  52. }
  53. extract_check() {
  54. local repository="$project"
  55. project_extract_check "$project" "$@"
  56. }
  57. update() {
  58. local repository="$project"
  59. project_update_git "$project" "$repository" "$@"
  60. }
  61. update_check() {
  62. local repository="$project"
  63. project_update_check_git "$project" "$repository" "$@"
  64. }
  65. build() {
  66. local repository="$project"
  67. project_sources_directory_missing_empty_error "$project" "$repository" "$@"
  68. if git_project_check "$repository"; then
  69. git_project_checkout "$project" "$repository" "$@"
  70. fi
  71. local sources_path="$(project_sources_path "$project" "$repository" "$@")"
  72. local build_path="$(project_build_path "$project" "$@")"
  73. mkdir -p "$build_path"
  74. make -C "$sources_path" -j"$TASKS"
  75. cp "$sources_path/build"/[!.]*.ttf "$build_path"
  76. make -C "$sources_path" clean
  77. }
  78. build_check() {
  79. project_build_check "$project" "$@"
  80. }
  81. install() {
  82. project_install "$project" "$@"
  83. }
  84. install_check() {
  85. project_install_check "$project" "$@"
  86. }
  87. release() {
  88. local repository="$project"
  89. project_release_sources_git "$project" "$repository" "$@"
  90. }
  91. release_check() {
  92. local repository="$project"
  93. project_release_check_sources_git "$project" "$repository" "$@"
  94. }
  95. clean() {
  96. project_clean "$project" "$@"
  97. }