cosmetics

Signed-off-by: fbt <fbt@fleshless.org>
This commit is contained in:
Jack L. Frost 2018-07-27 07:47:43 +03:00
parent b10611f5ae
commit 7eef67695a
1 changed files with 4 additions and 11 deletions

15
sx-open
View File

@ -85,16 +85,9 @@ main() {
while (( $# )); do
case $1 in
(-d)
printf 'Dry run: not actually running the handler\n' >&2
dry_run=1
verbose=1
;;
(-h) usage; return 0;;
(-d) dry_run=1; verbose=1;;
(-v) verbose=1;;
(-h) usage; return 0;;
(--) shift; break;;
(*) break;;
@ -103,9 +96,9 @@ main() {
shift
done
target=$1
target=$1; [[ "$target" ]] || { usage; exit; }
[[ "$target" ]] || { usage; exit; }
(( dry_run )) && printf 'Dry run: not actually running the handler\n' >&2
# Treat file:// as local paths.
[[ "$target" =~ ^file:(//)?(/.+) ]] && target=${BASH_REMATCH[2]}