Skip to content

Commit

Permalink
Print warning if app isn't installed
Browse files Browse the repository at this point in the history
  • Loading branch information
jonafll committed Nov 1, 2021
1 parent b7b7d43 commit 1e83809
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
9 changes: 8 additions & 1 deletion README.md
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,21 @@ Simple wrapper script around [fileicon](https://github.com/mklement0/fileicon) t
## Setup

### Prerequisites

[fileicon](https://github.com/mklement0/fileicon) needs to be installed on your system.

```shell
$ brew install fileicon
```

### Installation

```shell
$ curl -sSL https://github.com/jonafll/appiconupdate/releases/download/v0.1.0/appiconupdate.sh > /usr/local/bin/appiconupdate && chmod 755 /usr/local/bin/appiconupdate
```

Create a directory for your app icons and place them in it. Icons work best as .icns or .png files with 512x512 pixels.

```shell
$ mkdir /path/to/icons
```
Expand All @@ -32,15 +35,19 @@ Visual Studio Code.app Docker.app
```

## Usage

```shell
$ appiconupdate /path/to/icons
```

Optionally you can set the icon path as environment variable

```shell
export ICN_PATH=/path/to/icons
```

or create an alias.

```shell
alias appiconupdate="appiconupdate /path/to/icons"
```
```
3 changes: 2 additions & 1 deletion appiconupdate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

VERSION="v0.1.0"
RED=$'\e[1;31m'
YELLOW=$'\e[1;33m'
NC=$'\e[0m'

if [[ "$1" == "-v" || "$1" == "--version" ]]; then
Expand All @@ -23,7 +24,7 @@ for icn in "$ICN_PATH"/*; do
app=/Applications/$app_name.app

if [[ ! -d "$app" ]]; then
echo "${RED}Error:${NC} $app not found"
echo "${YELLOW}Skipping...${NC} $app not found"
continue
fi

Expand Down

0 comments on commit 1e83809

Please sign in to comment.