diff options
| author | Sebastiano Tronto <sebastiano.tronto@gmail.com> | 2021-11-24 19:42:47 +0100 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano.tronto@gmail.com> | 2021-11-24 19:42:47 +0100 |
| commit | eb8a7764b02b7b82c5a2303dd272788f4444bc33 (patch) | |
| tree | 021dc2bc7975eeaaea198daec7c66aafe9e145b9 /open-file | |
| parent | e22c1061bd60d817176de67dfbc0a818d525e154 (diff) | |
| download | scripts-eb8a7764b02b7b82c5a2303dd272788f4444bc33.tar.gz scripts-eb8a7764b02b7b82c5a2303dd272788f4444bc33.zip | |
Exit with error if at least one file fails to open (needed by xplumb)
Diffstat (limited to '')
| -rwxr-xr-x | open-file | 2 |
1 files changed, 1 insertions, 1 deletions
| @@ -39,7 +39,7 @@ toopen=$@ | |||
| 39 | [ -z "$toopen" ] && toopen=$(dmenu-filepicker) | 39 | [ -z "$toopen" ] && toopen=$(dmenu-filepicker) |
| 40 | 40 | ||
| 41 | for f in $toopen; do | 41 | for 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/*) |
