cosmetics
Signed-off-by: fbt <fbt@fleshless.org>
This commit is contained in:
parent
b10611f5ae
commit
7eef67695a
15
sx-open
15
sx-open
|
@ -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]}
|
||||
|
|
Loading…
Reference in New Issue
Block a user