diff options
author | EuAndreh <eu@euandre.org> | 2023-04-15 12:03:31 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2023-04-15 12:03:31 -0300 |
commit | cf74b537d9f13769c48ddea2825228a2cccd3f5c (patch) | |
tree | 4c9fc01f1e5915aba50ab984e8852e60646edb33 /bin | |
parent | bin/gc: Add "nix" to the list of TYPE in help string (diff) | |
download | dotfiles-cf74b537d9f13769c48ddea2825228a2cccd3f5c.tar.gz dotfiles-cf74b537d9f13769c48ddea2825228a2cccd3f5c.tar.xz |
bin/print: Only call lpoptions(1) after -h has been processed
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/print | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -107,7 +107,7 @@ for flag in "$@"; do esac done -lpoptions -o PrintQuality=standard +QUALITY_SET=false DUPLEX= while getopts 'dq:h' flag; do case "$flag" in @@ -115,6 +115,7 @@ while getopts 'dq:h' flag; do DUPLEX=1 ;; q) + QUALITY_SET=true case "$OPTARG" in low) lpoptions -o PrintQuality=draft @@ -144,6 +145,10 @@ while getopts 'dq:h' flag; do done shift $((OPTIND - 1)) +if [ "$QUALITY_SET" = false ]; then + lpoptions -o PrintQuality=standard +fi + NEWDIR="$(mkdtemp)" trap 'rm -rf "$NEWDIR"' EXIT if [ -z "${1:-}" ]; then |