commit e852f8fb65966c8a41f37da8fb493ba5a187e894
parent 8c2b3bddef09473c1d9a6b07d912c9903ca2f7a8
Author: JayVii <jayvii[AT]posteo[DOT]de>
Date: Thu, 12 Dec 2024 10:05:07 +0100
fix: do not use a file extension
Diffstat:
2 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/fetch_favicon.sh b/fetch_favicon.sh
@@ -15,6 +15,9 @@ DOMAINS=`
echo "$URLS" | sed -E -e 's/https:\/\/([^\/]+).*$/\1/g' | sort | uniq
`
+# Ensure directory exists
+mkdir -p ./assets/site-icons/
+
# loop through websites
for DOMAIN in $DOMAINS; do
@@ -40,15 +43,9 @@ for DOMAIN in $DOMAINS; do
-e "s/^(\.+)/https:\/\/$DOMAIN\/\1/"
`
- # # Get file extension
- # ICN_EXT=`
- # echo "$ICN_URI" | \
- # sed -E -e 's/^.*\.([^\.]+)$/\1/'
- # `
-
# Download Favicon to assets folder
curl --silent --location \
- --output "./assets/site-icons/${DOMAIN}.${ICN_EXT}" \
+ --output "./assets/site-icons/${DOMAIN}" \
"$ICN_URL"
done
diff --git a/run.sh b/run.sh
@@ -8,7 +8,7 @@ else
fi
# Re-download favicons
-source ./fetch_favicon.sh "$CONFIG" &
+./fetch_favicon.sh "$CONFIG" &
# Gather various information from config file
printf "Gather information from config file...\n"