Skip to content

Commit

Permalink
Update icon.sh and regenerate icons
Browse files Browse the repository at this point in the history
  • Loading branch information
Mishiranu committed Nov 11, 2020
1 parent 6180e23 commit 6fd92cb
Show file tree
Hide file tree
Showing 16 changed files with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions icon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@

cp 'icon.svg' 'icon-foreground.svg'
cp 'icon.svg' 'icon-logo.svg'
inkscape --select 'dash-group' --verb 'ObjectUnSetClipPath' --verb 'EditDeselect' \
--select 'circle' --select 'dash-clip-path' --verb 'EditDelete' --verb 'EditDeselect' \
--verb='FileSave' --verb 'FileQuit' 'icon-foreground.svg'
inkscape --batch-process 'icon-foreground.svg' --actions $(printf '%s;' \
'select:dash-group' 'ObjectUnSetClipPath' 'EditDeselect' \
'select:circle' 'select:dash-clip-path' 'EditDelete' 'EditDeselect' \
'FileSave' 'FileQuit')
sed -e 's/style=".*"/style="fill:#ffffff"/' -i 'icon-logo.svg'
inkscape --select 'dash-drop' --verb 'EditDelete' --verb 'EditDeselect' \
--select 'dash-group' --verb 'SelectionUnGroup' --verb 'EditDeselect' \
--verb 'EditSelectAll' --verb 'SelectionDiff' --verb 'EditDeselect' \
--verb='FileSave' --verb 'FileQuit' 'icon-logo.svg'
inkscape --batch-process 'icon-logo.svg' --actions $(printf '%s;' \
'select:dash-drop' 'EditDelete' 'EditDeselect' \
'select:dash-group' 'SelectionUnGroup' 'EditDeselect' \
'EditSelectAll' 'SelectionDiff' 'EditDeselect' \
'FileSave' 'FileQuit')

dimensions=(mdpi:1 hdpi:1.5 xhdpi:2 xxhdpi:3 xxxhdpi:4)
for dimension in ${dimensions[@]}; do
Expand All @@ -20,11 +22,11 @@ for dimension in ${dimensions[@]}; do
out_foreground="res/drawable-$resource/ic_launcher_foreground.png"
out_logo="res/mipmap-$resource/ic_logo.png"
out=("$out_launcher" "$out_foreground" "$out_logo")
size="`bc <<< "48 * $scale"`"
inkscape 'icon.svg' -a 15:15:93:93 -w "$size" -h "$size" -e "$out_launcher"
inkscape 'icon-logo.svg' -a 15:15:93:93 -w "$size" -h "$size" -e "$out_logo"
size="`bc <<< "108 * $scale"`"
inkscape 'icon-foreground.svg' -w "$size" -h "$size" -e "$out_foreground"
size="$(bc <<< "48 * $scale / 1")"
inkscape 'icon.svg' --export-area='15:15:93:93' -w "$size" -h "$size" -o "$out_launcher"
inkscape 'icon-logo.svg' --export-area='15:15:93:93' -w "$size" -h "$size" -o "$out_logo"
size="$(bc <<< "108 * $scale / 1")"
inkscape 'icon-foreground.svg' -w "$size" -h "$size" -o "$out_foreground"
optipng "${out[@]}"
exiftool -all= -overwrite_original "${out[@]}"
done
Expand Down
Binary file modified res/drawable-hdpi/ic_launcher_foreground.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/drawable-mdpi/ic_launcher_foreground.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/drawable-xhdpi/ic_launcher_foreground.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/drawable-xxhdpi/ic_launcher_foreground.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/drawable-xxxhdpi/ic_launcher_foreground.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/mipmap-hdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/mipmap-hdpi/ic_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/mipmap-mdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/mipmap-mdpi/ic_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/mipmap-xhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/mipmap-xhdpi/ic_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/mipmap-xxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/mipmap-xxhdpi/ic_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/mipmap-xxxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/mipmap-xxxhdpi/ic_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 6fd92cb

Please sign in to comment.