Skip to content

Commit

Permalink
search: missing cache-file
Browse files Browse the repository at this point in the history
  • Loading branch information
crpb committed Aug 20, 2023
1 parent 84b0303 commit a9cc2a7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fnt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ CACHEDIR="${HOME}/.fnt"
PACKAGES="${CACHEDIR}/Packages.xz"
# debian sid index
#INDEX="http:https://ftp.ch.debian.org/debian/dists/sid/main/binary-all/Packages.xz"
MIRROR="http:https://deb.debian.org/debian"
MIRROR="https:https://deb.debian.org/debian"
INDEX="${MIRROR}/dists/sid/main/binary-all/Packages.xz"
# google fonts index
GINDEX="https://sid.ethz.ch/debian/google-fonts/fonts-master"
Expand Down Expand Up @@ -207,6 +207,8 @@ case "$1" in
search|-s)
if [ -f "${PACKAGES}" ]; then
unxz -c "${PACKAGES}" | awk '/^Package: fonts-'"$2"'/ {gsub(/^Package: /,"");print;}'
else
echo "Skipping non-existant Packages cache. Consider running: ${BASH_SOURCE[0]} update" >&2
fi
curl -s "$GINDEX/ofl/" |grep "a href" |sed 's,.*">,google-,;s,/.*,,' |grep -v "\.\.$" | awk "/$2/"
curl -s "$GINDEX/apache/" |grep "a href" |sed 's,.*">,google-,;s,/.*,,' |grep -v "\.\.$" | awk "/$2/"
Expand Down

0 comments on commit a9cc2a7

Please sign in to comment.