X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=service-type-database%2Fbuild-db.in;h=44f606894092e17314bab47c3045c2538a1c8955;hb=f46bf65ce34ebd9c6bbcbe3628bd243bfa4bb129;hp=c27eb90b6215ab83702658a810c24135db7f32c0;hpb=2452b35ceb07e536c3c506c82cd79d44efad4165;p=catta diff --git a/service-type-database/build-db.in b/service-type-database/build-db.in index c27eb90..44f6068 100755 --- a/service-type-database/build-db.in +++ b/service-type-database/build-db.in @@ -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")