commit b5104a83286e73ff6d6ce4de6f8e9294815fce66 parent a522b50c772b1d0eba3d890a993bb5eda0a5cc02 Author: Anders Damsgaard <anders@adamsgaard.dk> Date: Thu, 8 Aug 2019 12:56:01 +0200 Only check file type if not reading from stdin Diffstat:
M | .local/bin/upload | | | 4 | +++- |
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/.local/bin/upload b/.local/bin/upload @@ -36,7 +36,9 @@ show_version() { } check_if_image() { - identify "$1" >/dev/null 2>&1 || die "Error: $1 is not an image" + if [ -f "$1" ]; then + identify "$1" >/dev/null 2>&1 || die "Error: $1 is not an image" + fi } add_sharpening() {