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