Skip to content

Commit

Permalink
Merge pull request #88 from Pyker/patch-1
Browse files Browse the repository at this point in the history
Fix shell in optimize-images script
  • Loading branch information
jmattheis authored Nov 7, 2024
2 parents 38bff75 + 07bcde8 commit b51f02d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/optimize-images.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ Install
Create a script, e.g. `/opt/gotify/optimize-images.sh` containing

```bash
#!/usr/bin/env sh
#!/usr/bin/env bash
set -e

DATA=/home/jm/src/gotify/server/data

for FILE in "$DATA"/images/*; do
if [ "$FILE" -nt "$DATA"/images-optimized ]; then
EXT=$(echo "${FILE#*.}"|tr '[:upper:]' '[:lower:]')
EXT=$(echo "${FILE##*.}"|tr '[:upper:]' '[:lower:]')
if [ "$EXT" = png -o "$EXT" = jpg -o "$EXT" = jpeg -o "$EXT" = gif ]; then
convert "$FILE" -resize "512>" "$FILE"
fi
Expand Down

0 comments on commit b51f02d

Please sign in to comment.