Index: Makefile ================================================================== --- Makefile +++ Makefile @@ -24,11 +24,11 @@ CKPATH=$(shell dirname $(shell dirname $(CSIPATH))) all : mtest dboard newdboard txtdb refdb : txtdb/txtdb.scm - csc txtdb/txtdb.scm -o refdb + csc -I txtdb txtdb/txtdb.scm -o refdb mtest: $(OFILES) megatest.o csc $(CSCOPTS) $(OFILES) megatest.o -o mtest dboard : $(OFILES) $(GOFILES) dashboard.scm Index: txtdb/txtdb.scm ================================================================== --- txtdb/txtdb.scm +++ txtdb/txtdb.scm @@ -394,10 +394,14 @@ ;; #f ;; (map cadr dat)))))) (define (edit-refdb path) ;; TEMPORARY, REMOVE IN 2014 + (if (not (file-exists? path)) ;; Create new + (begin + (print "INFO: Creating new txtdb at " path) + (create-new-db path))) (if (not (file-exists? (conc path "/sxml/_sheets.sxml"))) (begin (print "ERROR: You appear to have the old file structure for txtdb. Please do the following and try again.") (print) (print "mv " path "/sxml/sheets.sxml " path "/sxml/_sheets.sxml") @@ -453,21 +457,15 @@ ;;====================================================================== ;; C R E A T E N E W D B S ;;====================================================================== -(include "txtdb/metadat.scm") +(include "metadat.scm") ;; Creates a new db at path with one sheet (define (create-new-db path) - (create-directory path #t) - (create-directory (conc path "/sxml") #t)) - ;; Sheet1.dat - ;; sheet-names.cfg - ;; sxml/Sheet1.sxml - ;; sxml/_sheets.sxml - ;; sxml/_workbook.sxml + (extract-refdb minimal-sxml path)) (main) #|