diff options
author | Jesús <heckyel@hyperbola.info> | 2021-11-09 18:20:40 -0500 |
---|---|---|
committer | Jesús <heckyel@hyperbola.info> | 2021-11-09 18:20:40 -0500 |
commit | 1e520729865883326ea52d8878c620979af74673 (patch) | |
tree | 071be2db0948d8c561ef516d7ed838fe3b52b5f0 /scripts/fonts.bash | |
download | simple-1e520729865883326ea52d8878c620979af74673.tar.lz simple-1e520729865883326ea52d8878c620979af74673.tar.xz simple-1e520729865883326ea52d8878c620979af74673.zip |
initial import
Diffstat (limited to 'scripts/fonts.bash')
-rw-r--r-- | scripts/fonts.bash | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/scripts/fonts.bash b/scripts/fonts.bash new file mode 100644 index 0000000..9ae3ed6 --- /dev/null +++ b/scripts/fonts.bash @@ -0,0 +1,28 @@ +#!/bin/bash + +_dir="${2-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}" +_target="${_dir%/*}" # deleted slash +_dest="${_target%scripts}/dist/fonts/roboto/" + +# ============================================================================== +# FUNCTIONS - START +# ============================================================================== +run_prepare() { + install -d -m755 "${_dest}" +} + +run_roboto() +{ + local _name="${1-roboto-latin}" + local _src="${_target%scripts}/src/fonts/roboto/${_name}.woff2" # input + # copy font Roboto + if [[ -n "${_src}" ]]; then + cp -fv "${_src}" "${_dest}" + fi +} + +# ============================================================================== +# EXECUTION - START +# ============================================================================== +run_prepare "$@" +run_roboto "$@" |