aboutsummaryrefslogtreecommitdiff
path: root/open-file
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano.tronto@gmail.com>2021-11-24 19:42:47 +0100
committerSebastiano Tronto <sebastiano.tronto@gmail.com>2021-11-24 19:42:47 +0100
commiteb8a7764b02b7b82c5a2303dd272788f4444bc33 (patch)
tree021dc2bc7975eeaaea198daec7c66aafe9e145b9 /open-file
parente22c1061bd60d817176de67dfbc0a818d525e154 (diff)
downloadscripts-eb8a7764b02b7b82c5a2303dd272788f4444bc33.tar.gz
scripts-eb8a7764b02b7b82c5a2303dd272788f4444bc33.zip
Exit with error if at least one file fails to open (needed by xplumb)
Diffstat (limited to 'open-file')
-rwxr-xr-xopen-file2
1 files changed, 1 insertions, 1 deletions
diff --git a/open-file b/open-file
index 024f81a..2207a6f 100755
--- a/open-file
+++ b/open-file
@@ -39,7 +39,7 @@ toopen=$@
39[ -z "$toopen" ] && toopen=$(dmenu-filepicker) 39[ -z "$toopen" ] && toopen=$(dmenu-filepicker)
40 40
41for f in $toopen; do 41for f in $toopen; do
42 [ ! -f "$f" ] && echo "$f: bad argument" && continue 42 [ ! -f "$f" ] && echo "$f: bad argument" && exit 1
43 [ -z "$mimetype" ] && mimetype="$(file --mime-type "$f" -bL)" 43 [ -z "$mimetype" ] && mimetype="$(file --mime-type "$f" -bL)"
44 case "$mimetype" in 44 case "$mimetype" in
45 video/*) 45 video/*)

Generated with cgit - Back to sebastiano.tronto.net