]> gitweb.hhaalo.de Git - sane-kds-s2000w-net.git/commitdiff
optimize env var
authorBastian Dehn <hhaalo@arcor.de>
Thu, 16 Jul 2026 17:44:52 +0000 (19:44 +0200)
committerBastian Dehn <hhaalo@arcor.de>
Thu, 16 Jul 2026 17:44:52 +0000 (19:44 +0200)
src/debian/postinst

index 523b7ee0b0de658eeb07bebc14464848bcca616f..96c8ea565122bfd412e94e20ba3b7a55b813924e 100755 (executable)
@@ -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