Skip to content

Commit

Permalink
search ..
Browse files Browse the repository at this point in the history
  • Loading branch information
crpb committed Aug 9, 2023
1 parent 631ee4c commit 7cd7e70
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion fnt
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,11 @@ case "$1" in
# done
;;
preview|-p)
if [ ! $# -eq 2 ]; then
echo "No fontname supplied."
echo "Example: ${BASH_SOURCE[0]} preview agave"
exit 1
fi
# echo Previewing...
mkdir -p "${TMPDIR}"
if curl -L -s "https://screenshots.debian.net/screenshot/fonts-$2" -o "${TMPDIR}/preview.png"; then
Expand Down Expand Up @@ -193,7 +198,7 @@ case "$1" in
;;
search|-s)
if [ -f "${PACKAGES}" ]; then
unxz -c "${PACKAGES}" |grep ^Package:\ fonts-|awk '{print $2}' | grep "$2"
unxz -c "${PACKAGES}" | awk '/^Package: fonts-'"$2"'/ {gsub(/^Package: /,"");print;}'
fi
curl -s "$GINDEX/ofl/" |grep "a href" |sed 's,.*">,google-,;s,/.*,,' |grep -v "\.\.$" |grep "$2"
curl -s "$GINDEX/apache/" |grep "a href" |sed 's,.*">,google-,;s,/.*,,' |grep -v "\.\.$" |grep "$2"
Expand Down

0 comments on commit 7cd7e70

Please sign in to comment.