1234567891011121314151617181920212223242526272829 |
- #!/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 "$@"
|