From: Bastian Dehn Date: Thu, 16 Jul 2026 17:44:52 +0000 (+0200) Subject: optimize env var X-Git-Tag: v1.1.35^2~3^2~6 X-Git-Url: https://gitweb.hhaalo.de/?a=commitdiff_plain;h=eda10ea82edacb8dbce5081426618c5437dc0d47;p=sane-kds-s2000w-net.git optimize env var --- diff --git a/src/debian/postinst b/src/debian/postinst index 523b7ee..96c8ea5 100755 --- a/src/debian/postinst +++ b/src/debian/postinst @@ -11,21 +11,19 @@ find_config() add_entry() { - local entry="$1" - local dllconfig="$2" + local entry="kds_s2000w_net" - grep --silent "$entry" "$dllconfig" && return 0 - echo "$entry" >> "$dllconfig" + grep --silent "$entry" "$DLLCONFIG" && return 0 + echo "$entry" >> "$DLLCONFIG" echo "add kds_s2000w_net to ../build/dll.conf" } main() { DLLCONFIG=${DLLCONFIG:="/etc/sane.d/dll.conf"} - local ENTRY="kds_s2000w_net" - find_config "$DLLCONFIG" || return 0 - add_entry "$ENTRY" "$DLLCONFIG" + find_config || return 0 + add_entry } main \ No newline at end of file