particle-os-modules/modules/fonts/fonts.sh
Lucas Ribeiro 53507920aa
feat: fonts module (#52)
* feat: nerd-fonts modules

* feat: nerd-fonts modules

* feat: fonts module

* fix: fonts module readme

* chore: fonts module readme

* chore: fonts module

* chore: fonts module

* Update nerd-fonts.sh

* Update google-fonts.sh

* chore: scripts

* docs: unify font module grammar with other modules

fixes some misc grammar mistakes and makes documentation more inline with that of other modules

* refactor: move download.sh to root directory
this removes the need of the font source scripts
to have an environment variable with path to the ./scripts directory
making them more portable

* fix: get correct download.sh path
(relative to currently running script)

* chore: rm loop making .sh in scripts/ executable
this is not needed, as download.sh was moved and is called with bash

---------

Co-authored-by: xyny <60004820+xynydev@users.noreply.github.com>
2023-10-01 13:14:54 +00:00

16 lines
No EOL
343 B
Bash

#!/usr/bin/env bash
set -oue pipefail
export FONTS_MODULE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
for source in "$FONTS_MODULE_DIR"/sources/*.sh; do
chmod +x "$source"
filename=$(basename -- "$source")
get_yaml_array FONTS ".fonts.${filename%.*}[]" "$1"
bash "$source" "${FONTS[@]}"
done