dejavu-fonts 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  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. usage() {
  23. project_usage_actions "$project"
  24. project_usage_arguments "$project" "$@"
  25. }
  26. download() {
  27. local repository="$project"
  28. local sources_path="$(project_sources_path "$project" "$repository" "$@")"
  29. local ucd_version="$(dejavu_fonts_ucd_version "$UNICODE" "$@")"
  30. local ucd_files_path="$(dejavu_fonts_ucd_files_path "$UNICODE" "$@")"
  31. local -a download_list
  32. local -a ucd_files
  33. mapfile -t ucd_files < "$ucd_files_path"
  34. for file in "${ucd_files[@]}"; do
  35. download_list+=("https://www.unicode.org/Public/$ucd_version/ucd/$file")
  36. done
  37. project_download_git "$project" "$repository" https://github.com/dejavu-fonts/dejavu-fonts.git "$@"
  38. download_wrapper "$sources_path/resources" "${download_list[@]}"
  39. # Create a symlink to fontconfig's orthography files
  40. ln -fs ../../fontconfig/fc-lang "$sources_path/resources/fc-lang"
  41. }
  42. download_check() {
  43. local repository="$project"
  44. project_download_check_git "$project" "$repository" "$@"
  45. }
  46. extract() {
  47. local repository="$project"
  48. project_extract "$project" "$@"
  49. }
  50. extract_check() {
  51. local repository="$project"
  52. project_extract_check "$project" "$@"
  53. }
  54. update() {
  55. local repository="$project"
  56. project_update_git "$project" "$repository" "$@"
  57. }
  58. update_check() {
  59. local repository="$project"
  60. project_update_check_git "$project" "$repository" "$@"
  61. }
  62. build() {
  63. local repository="$project"
  64. project_sources_directory_missing_empty_error "$project" "$repository" "$@"
  65. if git_project_check "$repository"; then
  66. git_project_checkout "$project" "$repository" "$@"
  67. fi
  68. local sources_path="$(project_sources_path "$project" "$repository" "$@")"
  69. local build_path="$(project_build_path "$project" "$@")"
  70. mkdir -p "$build_path"
  71. make -C "$sources_path" -j"$TASKS"
  72. cp "$sources_path/build"/[!.]*.ttf "$build_path"
  73. make -C "$sources_path" clean
  74. }
  75. build_check() {
  76. project_build_check "$project" "$@"
  77. }
  78. install() {
  79. project_install "$project" "$@"
  80. }
  81. install_check() {
  82. project_install_check "$project" "$@"
  83. }
  84. release() {
  85. local repository="$project"
  86. project_release_sources_git "$project" "$repository" "$@"
  87. }
  88. release_check() {
  89. local repository="$project"
  90. project_release_check_sources_git "$project" "$repository" "$@"
  91. }
  92. clean() {
  93. project_clean "$project" "$@"
  94. }