dejavu-fonts 2.9 KB

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