db/Makefile
author Damiano Boppart <damiano@pep-security.net>
Fri, 11 Aug 2017 15:25:16 +0200
branchENGINE-228
changeset 1952 4722b371f609
parent 1513 e7f7e42385b5
child 1958 433df9ee336d
permissions -rw-r--r--
Cleanup db/Makefile
     1 # This file is under GNU General Public License 3.0
     2 # see LICENSE.txt
     3 
     4 include ../Makefile.conf
     5 
     6 .PHONY: db
     7 db: system.db
     8 
     9 DICOS = $(wildcard *.csv)
    10 
    11 system.db: create_system_db.sql $(DICOS)
    12 	# Keep a backup db around
    13 	-mv -f $@ $@~ 
    14 	sqlite3 -batch $@ < $<
    15 	for c in $(DICOS) ; do echo "$$c" ; echo .import "$$c" wordlist | sqlite3 -batch -csv $@ ; done
    16 
    17 .PHONY: install
    18 install: system.db
    19 	mkdir -p `dirname $(SYSTEM_DB)`
    20 	cp system.db $(SYSTEM_DB)
    21 
    22 .PHONY: clean
    23 clean:
    24 	-rm -f system.db system.db~