summaryrefslogtreecommitdiff
path: root/ar
diff options
context:
space:
mode:
Diffstat (limited to 'ar')
-rwxr-xr-xar/.local/bin/iconupdate9
1 files changed, 7 insertions, 2 deletions
diff --git a/ar/.local/bin/iconupdate b/ar/.local/bin/iconupdate
index 0a1aebb..2461498 100755
--- a/ar/.local/bin/iconupdate
+++ b/ar/.local/bin/iconupdate
@@ -5,15 +5,20 @@ tmpfile="$(mktemp)"
curl -sSL -o "$tmpfile" "https://raw.githubusercontent.com/FortAwesome/Font-Awesome/master/metadata/icons.json" || exit 1
+vs16="$(printf '\xEF\xB8\x8F')"
+
while read -r hex name; do
hex_uc=$(printf '%s' "$hex" | tr '[:lower:]' '[:upper:]')
- if [[ ${#hex_uc} -le 4 ]]; then
+ if [ ${#hex_uc} -le 4 ]; then
unicode="\\u$hex_uc"
else
unicode="\\U$(printf '%08X' "0x$hex_uc")"
fi
printf "%b %s; %s\n" "$unicode" "$name" "$hex"
-done < <(jq -r 'to_entries[] | select(.value.unicode) | .value.unicode + " " + .key' "$tmpfile") >"$icons"
+done < <(
+ jq -r 'to_entries[] | select(.value.unicode) | .value.unicode + " " + .key' "$tmpfile"
+) |
+ sed "s/$vs16//g" >"$icons"
rm -f "$tmpfile"
echo "Processing complete! icons saved to: $icons"