bash update

This commit is contained in:
Illya Marchenko 2019-11-17 22:55:25 +02:00
parent 033935bf67
commit fd853aebaa
3 changed files with 230 additions and 204 deletions

326
Makefile Normal file → Executable file

@ -1,164 +1,162 @@
# # All-in-one website favicon generator
# All-in-one website favicon generator # Copyright (C) 2019 Illya Marchenko <stuzer05@gmail.com>
# Copyright (C) 2019 Illya Marchenko <stuzer05@gmail.com> #
# # This program is free software: you can redistribute it and/or modify
# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by
# it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or
# the Free Software Foundation, either version 3 of the License, or # (at your option) any later version.
# (at your option) any later version. #
# # This program is distributed in the hope that it will be useful,
# This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of
# but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details.
# GNU General Public License for more details. #
# # You should have received a copy of the GNU General Public License
# You should have received a copy of the GNU General Public License # along with this program. If not, see <https://www.gnu.org/licenses/>.
# along with this program. If not, see <https://www.gnu.org/licenses/>.
CC = convert
CC = magick SOURCE ?= source.png
FILE ?= source.png
# Files & forlders
# Files & forlders DIST = dist
DIST = dist override DIST := $(DIST)/
override DIST := $(DIST)/ override dist_public = $(DIST)public/
override dist_public = $(DIST)public/ override dist_icons = $(DIST)public/icons/
override dist_icons = $(DIST)public/icons/
ICON_PATH = /icons
ICON_PATH = /icons override ICON_PATH := $(ICON_PATH)/
override ICON_PATH := $(ICON_PATH)/
override define file_manifest
override define file_manifest @echo '{' > $(dist_public)manifest.json
@echo '{' > $(dist_public)manifest.json @echo ' "name": "",' >> $(dist_public)manifest.json
@echo ' "name": "",' >> $(dist_public)manifest.json @echo ' "short_name": "",' >> $(dist_public)manifest.json
@echo ' "short_name": "",' >> $(dist_public)manifest.json @echo ' "icons": [' >> $(dist_public)manifest.json
@echo ' "icons": [' >> $(dist_public)manifest.json @echo ' {' >> $(dist_public)manifest.json
@echo ' {' >> $(dist_public)manifest.json @echo ' "src": "'$(ICON_PATH)'android-chrome-192x192.png",' >> $(dist_public)manifest.json
@echo ' "src": "'$(ICON_PATH)'android-chrome-192x192.png",' >> $(dist_public)manifest.json @echo ' "sizes": "192x192",' >> $(dist_public)manifest.json
@echo ' "sizes": "192x192",' >> $(dist_public)manifest.json @echo ' "type": "image/png"' >> $(dist_public)manifest.json
@echo ' "type": "image/png"' >> $(dist_public)manifest.json @echo ' },' >> $(dist_public)manifest.json
@echo ' },' >> $(dist_public)manifest.json @echo ' {' >> $(dist_public)manifest.json
@echo ' {' >> $(dist_public)manifest.json @echo ' "src": "'$(ICON_PATH)'android-chrome-512x512.png",' >> $(dist_public)manifest.json
@echo ' "src": "'$(ICON_PATH)'android-chrome-512x512.png",' >> $(dist_public)manifest.json @echo ' "sizes": "512x512",' >> $(dist_public)manifest.json
@echo ' "sizes": "512x512",' >> $(dist_public)manifest.json @echo ' "type": "image/png"' >> $(dist_public)manifest.json
@echo ' "type": "image/png"' >> $(dist_public)manifest.json @echo ' }' >> $(dist_public)manifest.json
@echo ' }' >> $(dist_public)manifest.json @echo ' ],' >> $(dist_public)manifest.json
@echo ' ],' >> $(dist_public)manifest.json @echo ' "theme_color": "",' >> $(dist_public)manifest.json
@echo ' "theme_color": "",' >> $(dist_public)manifest.json @echo ' "background_color": "",' >> $(dist_public)manifest.json
@echo ' "background_color": "",' >> $(dist_public)manifest.json @echo ' "display": "standalone"' >> $(dist_public)manifest.json
@echo ' "display": "standalone"' >> $(dist_public)manifest.json @echo '}' >> $(dist_public)manifest.json
@echo '}' >> $(dist_public)manifest.json endef
endef
override define file_ieconfig
override define file_ieconfig @echo '<?xml version="1.0" encoding="utf-8"?>' > $(dist_icons)ieconfig.xml
@echo '<?xml version="1.0" encoding="utf-8"?>' > $(dist_icons)ieconfig.xml @echo '<browserconfig>' >> $(dist_icons)ieconfig.xml
@echo '<browserconfig>' >> $(dist_icons)ieconfig.xml @echo ' <msapplication>' >> $(dist_icons)ieconfig.xml
@echo ' <msapplication>' >> $(dist_icons)ieconfig.xml @echo ' <tile>' >> $(dist_icons)ieconfig.xml
@echo ' <tile>' >> $(dist_icons)ieconfig.xml @echo ' <square70x70logo src="'$(ICON_PATH)'mstile-small.png"/>' >> $(dist_icons)ieconfig.xml
@echo ' <square70x70logo src="'$(ICON_PATH)'mstile-small.png"/>' >> $(dist_icons)ieconfig.xml @echo ' <square150x150logo src="'$(ICON_PATH)'mstile-medium.png"/>' >> $(dist_icons)ieconfig.xml
@echo ' <square150x150logo src="'$(ICON_PATH)'mstile-medium.png"/>' >> $(dist_icons)ieconfig.xml @echo ' <wide310x150logo src="'$(ICON_PATH)'mstile-wide.png"/>' >> $(dist_icons)ieconfig.xml
@echo ' <wide310x150logo src="'$(ICON_PATH)'mstile-wide.png"/>' >> $(dist_icons)ieconfig.xml @echo ' <square310x310logo src="'$(ICON_PATH)'mstile-large.png"/>' >> $(dist_icons)ieconfig.xml
@echo ' <square310x310logo src="'$(ICON_PATH)'mstile-large.png"/>' >> $(dist_icons)ieconfig.xml @echo ' <TileColor>#ffffff</TileColor>' >> $(dist_icons)ieconfig.xml
@echo ' <TileColor>#ffffff</TileColor>' >> $(dist_icons)ieconfig.xml @echo ' </tile>' >> $(dist_icons)ieconfig.xml
@echo ' </tile>' >> $(dist_icons)ieconfig.xml @echo ' </msapplication>' >> $(dist_icons)ieconfig.xml
@echo ' </msapplication>' >> $(dist_icons)ieconfig.xml @echo '</browserconfig>' >> $(dist_icons)ieconfig.xml
@echo '</browserconfig>' >> $(dist_icons)ieconfig.xml endef
endef
override define file_source
override define file_source @echo '<!-- Regular icons -->' > $(DIST)source.html
@echo '<!-- Regular icons -->' > $(DIST)source.html @echo '<link rel="icon" type="image/png" href="'$(ICON_PATH)'favicon-57x57.png" sizes="57x57">' >> $(DIST)source.html
@echo '<link rel="icon" type="image/png" href="'$(ICON_PATH)'favicon-57x57.png" sizes="57x57">' >> $(DIST)source.html @echo '<link rel="icon" type="image/png" href="'$(ICON_PATH)'favicon-76x76.png" sizes="76x76">' >> $(DIST)source.html
@echo '<link rel="icon" type="image/png" href="'$(ICON_PATH)'favicon-76x76.png" sizes="76x76">' >> $(DIST)source.html @echo '<link rel="icon" type="image/png" href="'$(ICON_PATH)'favicon-96x96.png" sizes="96x96">' >> $(DIST)source.html
@echo '<link rel="icon" type="image/png" href="'$(ICON_PATH)'favicon-96x96.png" sizes="96x96">' >> $(DIST)source.html @echo '<link rel="icon" type="image/png" href="'$(ICON_PATH)'favicon-128x128.png" sizes="128x128">' >> $(DIST)source.html
@echo '<link rel="icon" type="image/png" href="'$(ICON_PATH)'favicon-128x128.png" sizes="128x128">' >> $(DIST)source.html @echo '<link rel="icon" type="image/png" href="'$(ICON_PATH)'favicon-192x192.png" sizes="192x192">' >> $(DIST)source.html
@echo '<link rel="icon" type="image/png" href="'$(ICON_PATH)'favicon-192x192.png" sizes="192x192">' >> $(DIST)source.html @echo '<link rel="icon" type="image/png" href="'$(ICON_PATH)'favicon-196x196.png" sizes="196x196">' >> $(DIST)source.html
@echo '<link rel="icon" type="image/png" href="'$(ICON_PATH)'favicon-196x196.png" sizes="196x196">' >> $(DIST)source.html @echo '<link rel="icon" type="image/png" href="'$(ICON_PATH)'favicon-228x228.png" sizes="228x228">' >> $(DIST)source.html
@echo '<link rel="icon" type="image/png" href="'$(ICON_PATH)'favicon-228x228.png" sizes="228x228">' >> $(DIST)source.html @echo '<link rel="icon" type="image/png" href="'$(ICON_PATH)'favicon-16x16.png" sizes="16x16">' >> $(DIST)source.html
@echo '<link rel="icon" type="image/png" href="'$(ICON_PATH)'favicon-16x16.png" sizes="16x16">' >> $(DIST)source.html @echo '<link rel="icon" type="image/png" href="'$(ICON_PATH)'favicon-32x32.png" sizes="32x32">' >> $(DIST)source.html
@echo '<link rel="icon" type="image/png" href="'$(ICON_PATH)'favicon-32x32.png" sizes="32x32">' >> $(DIST)source.html @echo '<link rel="icon" type="image/png" href="'$(ICON_PATH)'favicon-48x48.png" sizes="48x48">' >> $(DIST)source.html
@echo '<link rel="icon" type="image/png" href="'$(ICON_PATH)'favicon-48x48.png" sizes="48x48">' >> $(DIST)source.html @echo '' >> $(DIST)source.html
@echo '' >> $(DIST)source.html @echo '<!-- Android icons -->' >> $(DIST)source.html
@echo '<!-- Android icons -->' >> $(DIST)source.html @echo '<link rel="shortcut icon" sizes="196x196" href="'$(ICON_PATH)'favicon-196x196.png">' >> $(DIST)source.html
@echo '<link rel="shortcut icon" sizes="196x196" href="'$(ICON_PATH)'favicon-196x196.png">' >> $(DIST)source.html @echo '<link rel="manifest" href="manifest.json">' >> $(DIST)source.html
@echo '<link rel="manifest" href="manifest.json">' >> $(DIST)source.html @echo '' >> $(DIST)source.html
@echo '' >> $(DIST)source.html @echo '<!-- Apple icons -->' >> $(DIST)source.html
@echo '<!-- Apple icons -->' >> $(DIST)source.html @echo '<link rel="apple-touch-icon" sizes="57x57" href="'$(ICON_PATH)'apple-touch-icon-57x57.png">' >> $(DIST)source.html
@echo '<link rel="apple-touch-icon" sizes="57x57" href="'$(ICON_PATH)'apple-touch-icon-57x57.png">' >> $(DIST)source.html @echo '<link rel="apple-touch-icon" sizes="114x114" href="'$(ICON_PATH)'apple-touch-icon-114x114.png">' >> $(DIST)source.html
@echo '<link rel="apple-touch-icon" sizes="114x114" href="'$(ICON_PATH)'apple-touch-icon-114x114.png">' >> $(DIST)source.html @echo '<link rel="apple-touch-icon" sizes="72x72" href="'$(ICON_PATH)'apple-touch-icon-72x72.png">' >> $(DIST)source.html
@echo '<link rel="apple-touch-icon" sizes="72x72" href="'$(ICON_PATH)'apple-touch-icon-72x72.png">' >> $(DIST)source.html @echo '<link rel="apple-touch-icon" sizes="144x144" href="'$(ICON_PATH)'apple-touch-icon-144x144.png">' >> $(DIST)source.html
@echo '<link rel="apple-touch-icon" sizes="144x144" href="'$(ICON_PATH)'apple-touch-icon-144x144.png">' >> $(DIST)source.html @echo '<link rel="apple-touch-icon" sizes="60x60" href="'$(ICON_PATH)'apple-touch-icon-60x60.png">' >> $(DIST)source.html
@echo '<link rel="apple-touch-icon" sizes="60x60" href="'$(ICON_PATH)'apple-touch-icon-60x60.png">' >> $(DIST)source.html @echo '<link rel="apple-touch-icon" sizes="120x120" href="'$(ICON_PATH)'apple-touch-icon-120x120.png">' >> $(DIST)source.html
@echo '<link rel="apple-touch-icon" sizes="120x120" href="'$(ICON_PATH)'apple-touch-icon-120x120.png">' >> $(DIST)source.html @echo '<link rel="apple-touch-icon" sizes="76x76" href="'$(ICON_PATH)'apple-touch-icon-76x76.png">' >> $(DIST)source.html
@echo '<link rel="apple-touch-icon" sizes="76x76" href="'$(ICON_PATH)'apple-touch-icon-76x76.png">' >> $(DIST)source.html @echo '<link rel="apple-touch-icon" sizes="152x152" href="'$(ICON_PATH)'apple-touch-icon-152x152.png">' >> $(DIST)source.html
@echo '<link rel="apple-touch-icon" sizes="152x152" href="'$(ICON_PATH)'apple-touch-icon-152x152.png">' >> $(DIST)source.html @echo '<link rel="apple-touch-icon" sizes="180x180" href="'$(ICON_PATH)'apple-touch-icon.png">' >> $(DIST)source.html
@echo '<link rel="apple-touch-icon" sizes="180x180" href="'$(ICON_PATH)'apple-touch-icon.png">' >> $(DIST)source.html @echo '' >> $(DIST)source.html
@echo '' >> $(DIST)source.html @echo '<!-- IE 10 Metro tile icons -->' >> $(DIST)source.html
@echo '<!-- IE 10 Metro tile icons -->' >> $(DIST)source.html @echo '<meta name="msapplication-TileColor" content="#ffffff">' >> $(DIST)source.html
@echo '<meta name="msapplication-TileColor" content="#ffffff">' >> $(DIST)source.html @echo '<meta name="msapplication-TileImage" content="'$(ICON_PATH)'mstile-144x144.png">' >> $(DIST)source.html
@echo '<meta name="msapplication-TileImage" content="'$(ICON_PATH)'mstile-144x144.png">' >> $(DIST)source.html @echo '' >> $(DIST)source.html
@echo '' >> $(DIST)source.html @echo '<!-- IE 11 Metro tile for Windows 8.1 start screen -->' >> $(DIST)source.html
@echo '<!-- IE 11 Metro tile for Windows 8.1 start screen -->' >> $(DIST)source.html @echo '<meta name="application-name" content="Application name">' >> $(DIST)source.html
@echo '<meta name="application-name" content="Application name">' >> $(DIST)source.html @echo '<meta name="msapplication-tooltip" content="Tooltip">' >> $(DIST)source.html
@echo '<meta name="msapplication-tooltip" content="Tooltip">' >> $(DIST)source.html @echo '<meta name="msapplication-config" content="'$(ICON_PATH)'ieconfig.xml">' >> $(DIST)source.html
@echo '<meta name="msapplication-config" content="'$(ICON_PATH)'ieconfig.xml">' >> $(DIST)source.html endef
endef
all: $(SOURCE)
all: $(FILE) -mkdir $(DIST) $(dist_public) $(dist_icons)
-mkdir $(DIST) $(dist_public)
-mkdir $(DIST) $(dist_icons) @echo "Generating.. Regular icons"
@$(CC) $(SOURCE) -resize 16x16! $(dist_icons)favicon-16x16.png
@echo "Generating.. Regular icons" @$(CC) $(SOURCE) -resize 32x32! $(dist_icons)favicon-32x32.png
$(CC) $(FILE) -resize 16x16! $(dist_icons)favicon-16x16.png @$(CC) $(SOURCE) -resize 48x48! $(dist_icons)favicon-48x48.png
$(CC) $(FILE) -resize 32x32! $(dist_icons)favicon-32x32.png @$(CC) $(SOURCE) -resize 57x57! $(dist_icons)favicon-57x57.png
$(CC) $(FILE) -resize 48x48! $(dist_icons)favicon-48x48.png @$(CC) $(SOURCE) -resize 76x76! $(dist_icons)favicon-76x76.png
$(CC) $(FILE) -resize 57x57! $(dist_icons)favicon-57x57.png @$(CC) $(SOURCE) -resize 96x96! $(dist_icons)favicon-96x96.png
$(CC) $(FILE) -resize 76x76! $(dist_icons)favicon-76x76.png @$(CC) $(SOURCE) -resize 128x128! $(dist_icons)favicon-128x128.png
$(CC) $(FILE) -resize 96x96! $(dist_icons)favicon-96x96.png @$(CC) $(SOURCE) -resize 192x192! $(dist_icons)favicon-192x192.png
$(CC) $(FILE) -resize 128x128! $(dist_icons)favicon-128x128.png @$(CC) $(SOURCE) -resize 192x192! $(dist_icons)favicon-196x196.png
$(CC) $(FILE) -resize 192x192! $(dist_icons)favicon-192x192.png @$(CC) $(SOURCE) -resize 228x228! $(dist_icons)favicon-228x228.png
$(CC) $(FILE) -resize 192x192! $(dist_icons)favicon-196x196.png
$(CC) $(FILE) -resize 228x228! $(dist_icons)favicon-228x228.png @echo "Packing.. triple-sized favicon.ico"
@$(CC) $(dist_icons)favicon-16x16.png $(dist_icons)favicon-32x32.png $(dist_icons)favicon-48x48.png $(dist_public)favicon.ico
@echo "Packing.. triple-sized favicon.ico"
$(CC) $(dist_icons)favicon-16x16.png $(dist_icons)favicon-32x32.png $(dist_icons)favicon-48x48.png $(dist_public)favicon.ico @echo "Generating.. Android icons"
@$(CC) $(SOURCE) -resize 196x196! $(dist_icons)favicon-196x196.png
@echo "Generating.. Android icons" @$(CC) $(SOURCE) -resize 192x192! $(dist_icons)android-chrome-192x192.png
$(CC) $(FILE) -resize 196x196! $(dist_icons)favicon-196x196.png @$(CC) $(SOURCE) -resize 196x196! $(dist_icons)android-chrome-512x512.png
$(CC) $(FILE) -resize 192x192! $(dist_icons)android-chrome-192x192.png
$(CC) $(FILE) -resize 196x196! $(dist_icons)android-chrome-512x512.png @echo "Generating.. Apple icons"
@$(CC) $(SOURCE) -resize 57x57! $(dist_icons)apple-touch-icon-57x57.png
@echo "Generating.. Apple icons" @$(CC) $(SOURCE) -resize 114x114! $(dist_icons)apple-touch-icon-114x114.png
$(CC) $(FILE) -resize 57x57! $(dist_icons)apple-touch-icon-57x57.png @$(CC) $(SOURCE) -resize 72x72! $(dist_icons)apple-touch-icon-72x72.png
$(CC) $(FILE) -resize 114x114! $(dist_icons)apple-touch-icon-114x114.png @$(CC) $(SOURCE) -resize 144x144! $(dist_icons)apple-touch-icon-144x144.png
$(CC) $(FILE) -resize 72x72! $(dist_icons)apple-touch-icon-72x72.png @$(CC) $(SOURCE) -resize 60x60! $(dist_icons)apple-touch-icon-60x60.png
$(CC) $(FILE) -resize 144x144! $(dist_icons)apple-touch-icon-144x144.png @$(CC) $(SOURCE) -resize 120x120! $(dist_icons)apple-touch-icon-120x120.png
$(CC) $(FILE) -resize 60x60! $(dist_icons)apple-touch-icon-60x60.png @$(CC) $(SOURCE) -resize 76x76! $(dist_icons)apple-touch-icon-76x76.png
$(CC) $(FILE) -resize 120x120! $(dist_icons)apple-touch-icon-120x120.png @$(CC) $(SOURCE) -resize 152x152! $(dist_icons)apple-touch-icon-152x152.png
$(CC) $(FILE) -resize 76x76! $(dist_icons)apple-touch-icon-76x76.png @$(CC) $(SOURCE) -resize 180x180! $(dist_icons)apple-touch-icon.png
$(CC) $(FILE) -resize 152x152! $(dist_icons)apple-touch-icon-152x152.png @$(CC) $(SOURCE) -resize 180x180! $(dist_public)apple-touch-icon.png
$(CC) $(FILE) -resize 180x180! $(dist_icons)apple-touch-icon.png @$(CC) $(SOURCE) -resize 180x180! -quality 80% $(dist_public)apple-touch-icon-precomposed.png
$(CC) $(FILE) -resize 180x180! $(dist_public)apple-touch-icon.png
$(CC) $(FILE) -resize 180x180! -quality 80% $(dist_public)apple-touch-icon-precomposed.png @echo "Generating.. IE 10 Metro tile icons"
@$(CC) $(SOURCE) -resize 144x144! $(dist_icons)mstile-144x144.png
@echo "Generating.. IE 10 Metro tile icons"
$(CC) $(FILE) -resize 144x144! $(dist_icons)mstile-144x144.png @echo "Generating.. IE 11 Metro tile for Windows 8.1 start screen"
@$(CC) $(SOURCE) -resize 70x70! $(dist_icons)mstile-small.png
@echo "Generating.. IE 11 Metro tile for Windows 8.1 start screen" @$(CC) $(SOURCE) -resize 150x150! $(dist_icons)mstile-medium.png
$(CC) $(FILE) -resize 70x70! $(dist_icons)mstile-small.png @$(CC) $(SOURCE) -resize 310x150! $(dist_icons)mstile-wide.png
$(CC) $(FILE) -resize 150x150! $(dist_icons)mstile-medium.png @$(CC) $(SOURCE) -resize 310x310! $(dist_icons)mstile-large.png
$(CC) $(FILE) -resize 310x150! $(dist_icons)mstile-wide.png
$(CC) $(FILE) -resize 310x310! $(dist_icons)mstile-large.png @echo "Generating.. manifest.json"
$(file_manifest)
@echo "Generating.. manifest.json"
$(file_manifest) @echo "Generating.. ieconfig.xml"
$(file_ieconfig)
@echo "Generating.. ieconfig.xml"
$(file_ieconfig) @echo "Generating.. source.html"
$(file_source)
@echo "Generating.. source.html"
$(file_source) @echo "Done."
@echo "Done." .PHONY: clean
clean:
.PHONY: clean $(RM) -r $(DIST)* $(subst /,,$(DIST))
clean:
$(RM) -r $(DIST)* $(subst /,,$(DIST))

@ -6,7 +6,7 @@ This includes iOS Safari, Google Chrome, Mozilla Firefox, Windows 8 and 10, and
To get started with favicon generator you need to make sure [ImageMagick](https://imagemagick.org/index.php) and the latest [GNU make](https://www.gnu.org/software/make/) software are installed and present in your PATH environment variable. To get started with favicon generator you need to make sure [ImageMagick](https://imagemagick.org/index.php) and the latest [GNU make](https://www.gnu.org/software/make/) software are installed and present in your PATH environment variable.
# Configuration # Configuration
By default, makefile uses `magick` filename for ImageMagick software, but you can change that by specifying a new name as a parameter for make By default, makefile uses `convert` file of ImageMagick software, but you can change that by specifying a new name as a parameter for make
``` ```
make CC=<executable name> make CC=<executable name>
``` ```
@ -24,53 +24,62 @@ or by changing the following line
FILE ?= <image filename> FILE ?= <image filename>
``` ```
# Using bash
You use bash script `generate.sh` to use the program anywhere on your system. First of, you have to areat a symbolic link to an executable using the following command
```bash
$ ln -s <path to program>/generate.sh ~/.local/bin/webicongen
# example: ln -s ~/Programs/Favicons_generation/generate.sh ~/.local/bin/webicongen
```
then you can use it in such a way
```bash
$ webicongen <image> <output dir>
```
The output directory will be created automatically.
# Usage # Usage
After everything is configured, simply place your image in the same directory as makefile, and then simply run `make`. It will generate the following directory structure After everything is configured, simply place your image in the same directory as makefile, and then simply run `make`. It will generate the following directory structure
``` ```
dist dist/
│ source.html ├── public
│   ├── apple-touch-icon.png
└───public │   ├── apple-touch-icon-precomposed.png
│ apple-touch-icon-precomposed.png │   ├── favicon.ico
│ apple-touch-icon.png │   ├── icons
│ favicon.ico │   │   ├── android-chrome-192x192.png
│ manifest.json │   │   ├── android-chrome-512x512.png
│   │   ├── apple-touch-icon-114x114.png
└───icons │   │   ├── apple-touch-icon-120x120.png
android-chrome-192x192.png │   │   ├── apple-touch-icon-144x144.png
android-chrome-512x512.png │   │   ├── apple-touch-icon-152x152.png
apple-touch-icon-114x114.png │   │   ├── apple-touch-icon-57x57.png
apple-touch-icon-120x120.png │   │   ├── apple-touch-icon-60x60.png
apple-touch-icon-144x144.png │   │   ├── apple-touch-icon-72x72.png
apple-touch-icon-152x152.png │   │   ├── apple-touch-icon-76x76.png
apple-touch-icon-57x57.png │   │   ├── apple-touch-icon.png
apple-touch-icon-60x60.png │   │   ├── favicon-128x128.png
apple-touch-icon-72x72.png │   │   ├── favicon-16x16.png
apple-touch-icon-76x76.png │   │   ├── favicon-192x192.png
apple-touch-icon.png │   │   ├── favicon-196x196.png
favicon-128x128.png │   │   ├── favicon-228x228.png
favicon-16x16.png │   │   ├── favicon-32x32.png
favicon-192x192.png │   │   ├── favicon-48x48.png
favicon-196x196.png │   │   ├── favicon-57x57.png
favicon-228x228.png │   │   ├── favicon-76x76.png
favicon-32x32.png │   │   ├── favicon-96x96.png
favicon-48x48.png │   │   ├── ieconfig.xml
favicon-57x57.png │   │   ├── mstile-144x144.png
favicon-76x76.png │   │   ├── mstile-large.png
favicon-96x96.png │   │   ├── mstile-medium.png
ieconfig.xml │   │   ├── mstile-small.png
mstile-144x144.png │   │   └── mstile-wide.png
mstile-large.png │   └── manifest.json
mstile-medium.png └── source.html
mstile-small.png
mstile-wide.png
``` ```
`source.html` contains HTML code that needs to be pasted in your document's head. `source.html` contains HTML code that needs to be pasted in your document's head.
`public` folder must be the same as your project's public folder, you can simply copy-paste it into your project (make sure you don't have one of these generated files already in your project, such as `manifest.json`). `public` folder must be the same as your project's public folder, you can simply copy-paste it into your project (make sure you don't have one of these generated files already in your project, such as `manifest.json`).
# Acknowledgements # Acknowledgements
I would love to hear any ideas or issues regarding this makefile. Make sure to create an issue or a pull request. I would love to hear any ideas or issues regarding this makefile. Make sure to create an issue or a pull request.
You can also send me an email at stuzer05@gmail.com You can also send me an email to stuzer05 at gmail.com

19
generate.sh Executable file

@ -0,0 +1,19 @@
#!/bin/bash
SCRIPT_FOLLOW=`realpath $0`
SCRIPT=`realpath -s $0`
SCRIPTPATH=`dirname $SCRIPT_FOLLOW`
CALLPATH=`pwd`
me=`basename "$0"`
DIST="dist"
if [ $# -eq 2 ]; then
DIST=$2
fi
if [ $# -gt 0 ]; then
make -C $SCRIPTPATH SOURCE="$(pwd)/$1" DIST="$CALLPATH/$DIST"
else
echo -e "Error: missing arguments\n"
echo -e "USAGE:"
echo -e "\t$me <image> <output dir>"
fi