Mercurial > hgrepos > FreeBSD > ports > sysutils > local-bsdtools
comparison sbin/fzfs @ 497:eb42828c0cbf
Use the new output routinges for errors in fzfs' global error handling
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Fri, 30 Aug 2024 16:48:24 +0200 |
| parents | 312aebce590c |
| children | 46406503a635 |
comparison
equal
deleted
inserted
replaced
| 496:8af33277a2dd | 497:eb42828c0cbf |
|---|---|
| 514 ;; | 514 ;; |
| 515 \?) | 515 \?) |
| 516 exit 2; | 516 exit 2; |
| 517 ;; | 517 ;; |
| 518 *) | 518 *) |
| 519 echo "ERROR: option handling failed" 1>&2 | 519 fatal 2 "option handling failed" 1>&2 |
| 520 exit 2 | |
| 521 ;; | 520 ;; |
| 522 esac | 521 esac |
| 523 done | 522 done |
| 524 # | 523 # |
| 525 # Reset the Shell's option handling system to prepare for handling | 524 # Reset the Shell's option handling system to prepare for handling |
| 526 # command-local options. | 525 # command-local options. |
| 527 # | 526 # |
| 528 shift $((OPTIND-1)) | 527 shift $((OPTIND-1)) |
| 529 OPTIND=1 | 528 OPTIND=1 |
| 530 | 529 |
| 531 test $# -gt 0 || { echo "ERROR: no command given" 1>&2; exit 2; } | 530 test $# -gt 0 || fatal 2 "no command given" |
| 532 | 531 |
| 533 command="$1" | 532 command="$1" |
| 534 shift | 533 shift |
| 535 | 534 |
| 536 case "${command}" in | 535 case "${command}" in |
| 545 ;; | 544 ;; |
| 546 create-tree) | 545 create-tree) |
| 547 command_create_tree "$@" | 546 command_create_tree "$@" |
| 548 ;; | 547 ;; |
| 549 *) | 548 *) |
| 550 echo "ERROR: unknown command \`${command}'" 1>&2 | 549 fatal 2 "unknown command \`${command}'" 1>&2 |
| 551 exit 2 | |
| 552 ;; | 550 ;; |
| 553 esac | 551 esac |
