Skip to content

Commit

Permalink
Make generate-images.sh create main-mobile.png
Browse files Browse the repository at this point in the history
* Change the `generate-images.sh` script so that it automatically
  generates the `main-mobile.png` image when any of the logos included
  in it are changed.

* Regenerate the `main-mobile.png` image.

Ref #54
    #56
  • Loading branch information
alrra committed Dec 16, 2014
1 parent 5b4bdc0 commit 42c67bf
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 7 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
### HEAD

* Add Opera Mini logo.
* Add `main-mobile.png`
[[#54](https://github.com/alrra/browser-logos/issues/54)]
[[#56](https://github.com/alrra/browser-logos/issues/56)].
* Add Opera Mini logo
[[8dda27f](https://github.com/alrra/browser-logos/commit/8dda27fbf2dce1c2870ea4115fa198c2bf64233a)].
* Add Android browser logo
[[#55](https://github.com/alrra/browser-logos/issues/55)].

Expand Down
21 changes: 15 additions & 6 deletions bin/generate-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,22 @@

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

declare groupImageName="main-desktop"

declare -a imageGroup=(
declare -a mainDesktopImageGroup=(
"chrome"
"firefox"
"internet-explorer"
"opera"
"safari"
)

declare -a mainMobileImageGroup=(
"android"
"chrome-android"

This comment has been minimized.

Copy link
@mathiasbynens

mathiasbynens Dec 16, 2014

Contributor

What about Firefox Browser for Android (and for FxOS)?

This comment has been minimized.

Copy link
@arthurvr

arthurvr Dec 16, 2014

And Chrome-ios? I believe it has more marketshare than Opera mini.

This comment has been minimized.

Copy link
@mathiasbynens

mathiasbynens Dec 16, 2014

Contributor

@arthurvr Chrome is already included in the graphic; Firefox isn’t.

And Chrome-ios? I believe it has more marketshare than Opera mini.

[citation needed]

This comment has been minimized.

Copy link
@arthurvr

arthurvr Dec 16, 2014

Nah... Chrome Andoid is. The icon is slightly else than Chrome Android.

This comment has been minimized.

Copy link
@mathiasbynens

mathiasbynens Dec 16, 2014

Contributor

@arthurvr In that case, could you submit a pull request for the Chrome on iOS icon to this repo?

This comment has been minimized.

Copy link
@alrra

alrra Dec 16, 2014

Author Owner

What about Firefox Browser for Android (and for FxOS)?

@mathiasbynens Fixed in af867d4.

And Chrome-ios?

@arthurvr Also, it is basically a WebView.

I was also talking with @paulirish about include UC (See also: Browser stats for Q1 and Q2).

This comment has been minimized.

Copy link
@arthurvr

arthurvr Dec 16, 2014

Okay, I agree about not including it in here. PR with logos this evening.

This comment has been minimized.

Copy link
@alrra

alrra Dec 16, 2014

Author Owner

I was also talking with @paulirish about include UC (See also: Browser stats for Q1 and Q2).

Done in 7ec5312.

"internet-explorer-tile"
"opera-mini"
"safari-ios"
)

declare -a imageSizes=(
'16x16'
'24x24'
Expand All @@ -38,6 +44,8 @@ declare scriptLocation="$(dirname ${BASH_SOURCE[0]})"
generate_group_image() {

local generateGroupImage="false"
declare -a imageGroup=("${!1}"); shift;
local groupImageName="$1.png"; shift;
declare -a tmp=()

# Do not generate new group image if none of composing images are modified
Expand Down Expand Up @@ -70,8 +78,8 @@ generate_group_image() {
-resize 512x512 \
-extent 562x562 \
+append \
"$groupImageName.png" \
&& print_success_msg " [create]" "$groupImageName.png"
"$groupImageName" \
&& print_success_msg " [create]" "$groupImageName"

fi
}
Expand Down Expand Up @@ -144,7 +152,8 @@ main() {
print_success_msg "Generate images"
printf "\n"

generate_group_image $@ \
generate_group_image mainDesktopImageGroup[@] "main-desktop" $@ \
&& generate_group_image mainMobileImageGroup[@] "main-mobile" $@ \
&& generate_images $@ \
&& (
printf "\n"
Expand Down
Binary file modified main-mobile.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 42c67bf

Please sign in to comment.