summary refs log tree commit diff stats
path: root/scripts/generate_logo.sh
blob: bd97ecfe68ff26c6150956503a67530f7e5c40b3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#! /bin/sh

# rocie - An enterprise grocery management system - Web app
#
# Copyright (C) 2026 Benedikt Peetz <benedikt.peetz@b-peetz.de>
# SPDX-License-Identifier: GPL-3.0-or-later
#
# This file is part of Rocie.
#
# You should have received a copy of the License along with this program.
# If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>.

if [ -f "./dist/favicon-1024.png" ]; then
    # Bail out early
    exit 0
fi

set -x

magick ./public/logo.svg -resize 1024x1024 -transparent white ./dist/favicon-1024.png

magick ./dist/favicon-1024.png -resize 16x16 ./dist/favicon-16.png
magick ./dist/favicon-1024.png -resize 32x32 ./dist/favicon-32.png
magick ./dist/favicon-1024.png -resize 64x64 ./dist/favicon-64.png
magick ./dist/favicon-1024.png -resize 128x128 ./dist/favicon-128.png
magick ./dist/favicon-1024.png -resize 256x256 ./dist/favicon-256.png
magick ./dist/favicon-1024.png -resize 512x512 ./dist/favicon-512.png

magick \
    ./dist/favicon-16.png \
    ./dist/favicon-32.png \
    ./dist/favicon-64.png \
    ./dist/favicon-128.png \
    ./dist/favicon-256.png \
    ./dist/favicon-512.png \
    ./dist/favicon-1024.png \
    -colors 256 \
    ./public/favicon.ico

# vim: ft=sh