consistent shell formatting

This commit is contained in:
Daylin Morgan 2022-03-02 13:36:54 -06:00
parent 779405667c
commit 312b059e67
2 changed files with 9 additions and 12 deletions

View File

@ -1,12 +1,11 @@
#!/usr/bin/env bash #!/usr/bin/env bash
exts=(otf ttf woff woff2) exts=(otf ttf woff woff2)
ext=$1 ext=$1
shift shift
fp_args=$@ fp_args=$@
if [[ -z "$ext" ]];then if [[ -z $ext ]]; then
echo "please provide an extension" echo "please provide an extension"
exit 1 exit 1
fi fi
@ -21,10 +20,8 @@ fi
echo "Patching all fonts with ext -> $ext" echo "Patching all fonts with ext -> $ext"
echo "Using the following arguments for font-patcher $fp_args" echo "Using the following arguments for font-patcher $fp_args"
for fontfile in MonoLisa/$ext/*.$ext; do for fontfile in MonoLisa/$ext/*.$ext; do
fontforge -script font-patcher $fontfile -o patched/$ext $fp_args fontforge -script font-patcher $fontfile -o patched/$ext $fp_args
done done

View File

@ -4,16 +4,16 @@ PATCHED_FONTS=./patched
INSTALL_DIR=~/.local/share/fonts/MonoLisa INSTALL_DIR=~/.local/share/fonts/MonoLisa
for font_dir in $PATCHED_FONTS/*; do for font_dir in $PATCHED_FONTS/*; do
patched_dir="${font_dir##*/}" patched_dir="${font_dir##*/}"
echo ">>> $patched_dir" echo ">>> $patched_dir"
if [[ -d "${INSTALL_DIR}/${patched_dir}" ]]; then if [[ -d "${INSTALL_DIR}/${patched_dir}" ]]; then
echo "deleting existing version" echo "deleting existing version"
rm -rf $INSTALL_DIR/$patched_dir rm -rf $INSTALL_DIR/$patched_dir
fi fi
dest=$INSTALL_DIR/$patched_dir dest=$INSTALL_DIR/$patched_dir
mkdir $dest && cp -v $font_dir/* $dest mkdir $dest && cp -v $font_dir/* $dest
done done
echo "Don't forget to run 'fc-cache -f -v'" echo "Don't forget to run 'fc-cache -f -v'"