sane-open: refactor

This commit is contained in:
2024-08-01 18:54:04 +00:00
parent 7c1a0fc323
commit 5ed6e84cc7

View File

@@ -196,28 +196,28 @@ while [ $# -gt 0 ]; do
arg="$1" arg="$1"
shift shift
case "$arg" in case "$arg" in
"--auto-keyboard") ("--application")
autoKeyboard=1
;;
"--help")
usage 0
;;
"--application")
resourceType="application" resourceType="application"
;; ;;
"--debug") ("--auto-keyboard")
autoKeyboard=1
;;
("--debug")
SANE_OPEN_DEBUG=1 SANE_OPEN_DEBUG=1
;; ;;
"--desktop-file") ("--desktop-file")
resourceType="desktopFile" resourceType="desktopFile"
;; ;;
"--file") ("--help")
usage 0
;;
("--file")
resourceType="file" resourceType="file"
;; ;;
"--uri") ("--uri")
resourceType="uri" resourceType="uri"
;; ;;
*) (*)
if [ $# -ne 0 ]; then if [ $# -ne 0 ]; then
usage 1 usage 1
fi fi