diff options
author | Marvin Borner | 2022-05-31 14:17:19 +0200 |
---|---|---|
committer | Marvin Borner | 2022-05-31 14:17:19 +0200 |
commit | b8be82d9113dd0fec9021aa573039cc64dbd849a (patch) | |
tree | 0694d21e5ba03e843dc6f03d1c5b1ed033123875 /.repos/farbfeld/2ff | |
parent | 272cc6e941d798d7270fcf74a98f592ef06e14ac (diff) |
Clean
Diffstat (limited to '.repos/farbfeld/2ff')
-rwxr-xr-x | .repos/farbfeld/2ff | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/.repos/farbfeld/2ff b/.repos/farbfeld/2ff deleted file mode 100755 index 6ce91b9..0000000 --- a/.repos/farbfeld/2ff +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/sh - -# arguments -if [ "$#" -ne 0 ]; then - echo "usage: $0" >&2 - exit 1 -fi - -# write input into temporary file -TMP=$(mktemp) -trap 'rm "$TMP"' EXIT -cat > "$TMP" - -# determine the mime-type -if [ "$(dd if="$TMP" bs=1 count=8 2>/dev/null | tr -d '\0')" = "farbfeld" ]; then - cat "$TMP" -else - MIME=$(file -ib "$TMP" | cut -d ";" -f 1) - - case "$MIME" in - image/png) - png2ff < "$TMP" - ;; - image/jpeg) - jpg2ff < "$TMP" - ;; - *) - convert "$TMP" png:- | png2ff - ;; - esac -fi - -# errors -if [ $? -ne 0 ]; then - exit 1 -else - exit 0 -fi |