From eda10ea82edacb8dbce5081426618c5437dc0d47 Mon Sep 17 00:00:00 2001 From: Bastian Dehn Date: Thu, 16 Jul 2026 19:44:52 +0200 Subject: [PATCH] optimize env var --- src/debian/postinst | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) 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 -- 2.47.3