]> git.meshlink.io Git - catta/blobdiff - service-type-database/build-db.in
libavahi-common needs to link libintl
[catta] / service-type-database / build-db.in
index c27eb90b6215ab83702658a810c24135db7f32c0..44f606894092e17314bab47c3045c2538a1c8955 100755 (executable)
@@ -19,7 +19,7 @@
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 # USA.
 
-import dbm, sys
+import @DBM@, sys
 
 if len(sys.argv) > 1:
     infn = sys.argv[1]
@@ -29,12 +29,9 @@ else:
 if len(sys.argv) > 2:
     outfn = sys.argv[2]
 else:
-    outfn = infn
+    outfn = infn + ".db"
 
-if outfn.endswith(".db"):
-    outfn = outfn[:-3]
-
-db = dbm.open(outfn, "n")
+db = @DBM@.open(outfn, "n")
 
 for ln in file(infn, "r"):
     ln = ln.strip(" \r\n\t")