aboutsummaryrefslogtreecommitdiff
path: root/projects
diff options
context:
space:
mode:
Diffstat (limited to 'projects')
-rw-r--r--projects/dejavu-fonts/configs/unicode/ucd-files2
-rw-r--r--projects/dejavu-fonts/configs/unicode/ucd-version1
-rwxr-xr-xprojects/dejavu-fonts/dejavu-fonts21
-rw-r--r--projects/dejavu-fonts/dejavu-fonts-helper28
4 files changed, 44 insertions, 8 deletions
diff --git a/projects/dejavu-fonts/configs/unicode/ucd-files b/projects/dejavu-fonts/configs/unicode/ucd-files
new file mode 100644
index 00000000..9b46bb9a
--- /dev/null
+++ b/projects/dejavu-fonts/configs/unicode/ucd-files
@@ -0,0 +1,2 @@
+Blocks.txt
+UnicodeData.txt
diff --git a/projects/dejavu-fonts/configs/unicode/ucd-version b/projects/dejavu-fonts/configs/unicode/ucd-version
new file mode 100644
index 00000000..275283a1
--- /dev/null
+++ b/projects/dejavu-fonts/configs/unicode/ucd-version
@@ -0,0 +1 @@
+11.0.0
diff --git a/projects/dejavu-fonts/dejavu-fonts b/projects/dejavu-fonts/dejavu-fonts
index 037aa3d9..2c5f518b 100755
--- a/projects/dejavu-fonts/dejavu-fonts
+++ b/projects/dejavu-fonts/dejavu-fonts
@@ -26,17 +26,22 @@ usage() {
download() {
local repository="$project"
+ local sources_path="$(project_sources_path "$project" "$repository" "$@")"
+ local ucd_version="$(dejavu_fonts_ucd_version "$UNICODE" "$@")"
+ local ucd_files_path="$(dejavu_fonts_ucd_files_path "$UNICODE" "$@")"
- project_download_git "$project" \
- "$repository" \
- 'https://github.com/dejavu-fonts/dejavu-fonts.git' \
- "$@"
+ local -a download_list
+ local -a ucd_files
- local sources_path="$(project_sources_path "$project" "$repository" "$@")"
+ mapfile -t ucd_files < "$ucd_files_path"
+
+ for file in "${ucd_files[@]}"; do
+ download_list+=("https://www.unicode.org/Public/$ucd_version/ucd/$file")
+ done
+
+ project_download_git "$project" "$repository" https://github.com/dejavu-fonts/dejavu-fonts.git "$@"
- download_wrapper "$sources_path/resources" \
- 'https://www.unicode.org/Public/UNIDATA/UnicodeData.txt' \
- 'https://www.unicode.org/Public/UNIDATA/Blocks.txt'
+ download_wrapper "$sources_path/resources" "${download_list[@]}"
}
download_check() {
diff --git a/projects/dejavu-fonts/dejavu-fonts-helper b/projects/dejavu-fonts/dejavu-fonts-helper
new file mode 100644
index 00000000..ff750588
--- /dev/null
+++ b/projects/dejavu-fonts/dejavu-fonts-helper
@@ -0,0 +1,28 @@
+#!/usr/bin/env bash
+
+# Copyright (C) 2018 Andrew Robbins <contact@andrewrobbins.info>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+UCD_FILES='ucd-files'
+UCD_VERSION='ucd-version'
+UNICODE='unicode'
+
+dejavu_fonts_ucd_version() {
+ project_file_contents "$project" "$CONFIGS" "$UCD_VERSION" "$@"
+}
+
+dejavu_fonts_ucd_files_path() {
+ project_file_path "$project" "$CONFIGS" "$UCD_FILES" "$@"
+}