12345678910111213141516171819202122232425262728 |
- #!/bin/bash
- # Copy fonts
- #
- run_opensans()
- {
- local _name="${1-latin}"
- local _dir="${2-$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)}"
- local _target="${_dir%/*}" # deleted slash
- local _src="${_target%scripts}/src/fonts/opensans/${_name}.woff2" # input
- local _dest="${_target%scripts}/dist/fonts/opensans/" # output
- # copy font Roboto
- if [[ -n "${_src}" ]];
- then
- rm -rfv "${_dest}"
- mkdir -p "${_dest}"
- cp -fv "${_src}" "${_dest}"
- fi
- }
- # ==============================================================================
- # EXECUTION - START
- # ==============================================================================
- run_opensans "$@"
|