X-Git-Url: http://git.indexdata.com/?p=irspy-moved-to-github.git;a=blobdiff_plain;f=zebra%2FMakefile;h=86154e21c1e9106c255623084a0e6b8e892c2dec;hp=2e6908cb0d458bc2ee418ad47319a22ab0ce00a7;hb=b0bc17688d5cb44ff7ab3137257e7744c2ed777d;hpb=2b95d4f4edf2965549e908c14f48ea55192a6c8c diff --git a/zebra/Makefile b/zebra/Makefile index 2e6908c..86154e2 100644 --- a/zebra/Makefile +++ b/zebra/Makefile @@ -1,4 +1,16 @@ -# $Id: Makefile,v 1.3 2006-06-20 11:06:02 mike Exp $ + +IRSPY_ARCHIVE= records-2010-04-06 +IRSPY_ARCHIVE_EXT= .tar.gz +DUMP_DIR= irspy-dump +ZEBRA_DIR= db + +# debugging +ZEBRA_TEST_DIR= db-test + +DATE:= $(shell date '+%Y-%m-%d') + +all: help + test: xmllint --noout --schema zeerex-2.0.xsd zeerex.xml @@ -6,6 +18,35 @@ test: terse.properties: pqf.properties sed -n 's/#.*//; s/[ ]*//; s/[ ][ ]*/ /g; /./p' $? > $@ +newdb: + tar xzf ${DUMP_DIR}/${IRSPY_ARCHIVE}${IRSPY_ARCHIVE_EXT} + mkdir -p ${ZEBRA_DIR}/lock ${ZEBRA_DIR}/register ${ZEBRA_DIR}/shadow ${ZEBRA_DIR}/tmp + zebraidx-2.0 init + zebraidx-2.0 update zeerex.xml + zebraidx-2.0 update ${IRSPY_ARCHIVE} + zebraidx-2.0 commit + +newdb-test: + tar xzf ${DUMP_DIR}/${IRSPY_ARCHIVE}${IRSPY_ARCHIVE_EXT} + mkdir -p ${ZEBRA_TEST_DIR}/lock ${ZEBRA_TEST_DIR}/register ${ZEBRA_TEST_DIR}/shadow ${ZEBRA_TEST_DIR}/tmp + zebraidx-2.0 -c zebra-test.cfg init + zebraidx-2.0 -c zebra-test.cfg update zeerex-test.xml + zebraidx-2.0 -c zebra-test.cfg update ${IRSPY_ARCHIVE} + zebraidx-2.0 -c zebra-test.cfg commit + +dump: + rm -rf records-${DATE}.old + -test -e records-${DATE} && mv records-${DATE} records-${DATE}.old + mkdir records-${DATE} + cd records-${DATE} && ../../bin/irspy-dump.pl irspy.indexdata.com:8018/IR-Explain---1 + tar cfz records-${DATE} records-${DATE} + clean: rm -f terse.properties +distclean: clean + rm -rf ${IRSPY_ARCHIVE} ${ZEBRA_DIR} ${ZEBRA_DIR} + +help: + @echo "make [ dump | test | newdb | newdb-test | clean | distclean ]" +