diff options
author | sinanmohd <sinan@firemail.cc> | 2023-03-20 17:17:12 +0530 |
---|---|---|
committer | sinanmohd <sinan@firemail.cc> | 2023-03-20 17:17:12 +0530 |
commit | c64fd9b62dc40008898b238dc5061490594e2ca7 (patch) | |
tree | e85b0fc3a1a3f56bedf2a0813d7562c35bded709 | |
parent | 605cedbc0477904d489cbeeab70ed12e81effb49 (diff) |
clean: use logical operators instead of if
-rwxr-xr-x | dpass | 4 | ||||
-rwxr-xr-x | pirowatch | 4 |
2 files changed, 2 insertions, 6 deletions
@@ -42,9 +42,7 @@ search() do pass_path="${pass_path}/$(printf '%s\n' "$pass_path"/* | sed 's/.*\///g' | - "$menu" -l 25 -p " ${pass_path##*/} ")" - - [ "$?" != 0 ] && + "$menu" -l 25 -p " ${pass_path##*/} ")" || die "noting selected" done @@ -55,9 +55,7 @@ stream() { webtorrent --mpv -o "$cache_dir" --torrent-port "$torrent_port" --dht-port "$dht_port" "$1" --select "$2" else webtorrent --mpv -o "$cache_dir" --torrent-port "$torrent_port" --dht-port "$dht_port" "$1" - fi - - [ "$?" != 0 ] && + fi || die "webtorrent failed to play" } |