This repository has been archived on 2024-05-13. You can view files and clone it, but cannot push or open issues or pull requests.
share2fedi/script/build-icons

21 lines
507 B
Text
Raw Normal View History

2023-03-16 11:58:52 -05:00
#!/bin/bash
# This script converts raw SVG icons to favicons according to the article:
# https://evilmartians.com/chronicles/how-to-favicon-in-2021-six-files-that-fit-most-needs
2023-03-17 20:11:18 -05:00
#
# © 2023 Nikita Karamov
# Licensed under AGPL v3 or later
2023-03-16 11:58:52 -05:00
set -euo pipefail
if ! type "magick"; then
echo "ImageMagick ('magick') not found; exiting"
exit 1
fi
2023-03-17 20:02:20 -05:00
node script/icons.js
2023-03-16 11:58:52 -05:00
2023-03-17 20:02:20 -05:00
magick convert public/favicon-32.png public/favicon-16.png public/favicon.ico
rm public/favicon-32.png public/favicon-16.png
2023-03-16 11:58:52 -05:00
echo "Done."