forked from alexmyczko/fnt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'alexmyczko:main' into apt-moo
- Loading branch information
Showing
1 changed file
with
14 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ set -e | |
# APT but only for fonts | ||
# [email protected] | ||
# [email protected] | ||
|
||
VERSION=1.8 | ||
# Defaults | ||
BASE=${XDG_DATA_HOME:-"$HOME/.local/share"} | ||
TARGET="$BASE/fonts" | ||
|
@@ -241,41 +241,41 @@ preview() { | |
case "$s" in | ||
Darwin) | ||
#echo macOS | ||
check="curl brew otfinfo" | ||
md5="md5sum" | ||
check="$md5 curl brew otfinfo ar" | ||
# otfinfo comes with lcdf-typetools | ||
i="brew" | ||
md5="md5sum" | ||
TARGET="$HOME/Library/Fonts/" | ||
FNTDATA="$HOME/.fnt" | ||
;; | ||
Linux|GNU/kFreeBSD|GNU) | ||
#echo Linux | ||
check="curl otfinfo" | ||
i="apt" | ||
md5="md5sum" | ||
check="$md5 ar awk curl file otfinfo tar unxz xzcat" | ||
i="apt" | ||
# TARGET="$HOME/.fonts/" | ||
if [ 0 -eq "$(id -u)" ]; then | ||
TARGET="/usr/local/share/fonts/" | ||
fi | ||
;; | ||
FreeBSD) | ||
#echo FreeBSD | ||
check="curl otfinfo" | ||
i="pkg" | ||
md5="md5" | ||
check="$md5 curl otfinfo ar" | ||
i="pkg" | ||
TARGET="$HOME/.fonts" | ||
FNTDATA="$HOME/.fnt" | ||
;; | ||
OpenBSD) | ||
#echo OpenBSD | ||
check="curl otfinfo" | ||
i="pkg_add" | ||
md5="md5" | ||
check="$md5 curl otfinfo ar" | ||
i="pkg_add" | ||
#TARGET="$HOME/.local/share/fonts" | ||
;; | ||
Haiku) | ||
#echo Haiku OS | ||
check="curl" | ||
check="curl ar" | ||
i="pkgman" | ||
TARGET="$HOME/config/non-packaged/data/fonts" | ||
FNTDATA="$HOME/.fnt" | ||
|
@@ -336,7 +336,8 @@ EOF | |
mkdir -p "$FNTINDEXDIR" | ||
INSTALLEDFONTS=$(fnt list index) | ||
ALLFONTS=$(${BASH_SOURCE[0]} search) | ||
printf 'fnt infos...\nFNTDATA %s (%s)\nTARGET %s (%s)\n' \ | ||
printf 'fnt v:%s infos...\nFNTDATA %s (%s)\nTARGET %s (%s)\n' \ | ||
"$VERSION" \ | ||
"$FNTDATA" "$(du -hs "$FNTDATA" |cut -f1)" \ | ||
"$TARGET" "$(du -hs "$TARGET" |cut -f1)" | ||
printf 'Available Fonts from\tDebian: %i\tGoogle: %i\n' \ | ||
|
@@ -441,8 +442,8 @@ EOF | |
EOF | ||
;; | ||
*) | ||
$cat << 'EOF' | ||
.d888 | ||
$cat << EOF | ||
.d888 $VERSION | ||
d88P" 888 | ||
888 888 | ||
.d88888 888888b. d888888 | ||
|