comparison FaCT++-linux-v1.5.2/Models.lisp/create-new-test @ 19:cc270db37d33 draft

Directories re-arranged
author Mikel Egana Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
date Sat, 06 Oct 2012 21:50:39 +0200
parents OPPL/FaCT++-linux-v1.5.2/Models.lisp/create-new-test@40adbcb2a7cc
children
comparison
equal deleted inserted replaced
18:d3616fac4ca5 19:cc270db37d33
1 #!/bin/bash
2
3 # Script for creating new test-suit.
4 # In parameters: <suit-name> <source-tbox>
5 # output:
6 # - create <suit-name> directory
7 # - copy <source-tbox> into <suit-name>/<suit-name>.tbox
8 # - create Makefile and conf-file
9
10 # file names
11 MKNAME=./$1/Makefile
12 TBOXNAME=./$1/$1.tbox
13 CONFNAME=./$1/$1.conf
14
15 # .orig files path
16 OFP=.
17
18 Usage()
19 {
20 echo
21 echo "Usage: create-new-test <suit-name> <source-tbox>"
22 echo " where: <suit-name> -- unique name for new suit"
23 echo " <source-tbox> -- test TBox file"
24 exit 1
25 }
26
27 Fatal()
28 {
29 echo "Fatal: directory $1 already exists"
30 exit 1
31 }
32
33 # check for the parameters
34 if test "$1" = ""; then
35 Usage
36 elif test "$2" = ""; then
37 Usage
38 fi
39
40 # create new subdir
41 mkdir $1 || Fatal
42
43 # create Makefile for the test suit
44 cp $OFP/Makefile.default $MKNAME
45 echo "KB_CONF = $1.conf" >> $MKNAME
46 echo "KB = $1.tbox" >> $MKNAME
47 echo >> $MKNAME
48 echo "sat classify:" >> $MKNAME
49 echo " FaCT++ \$(KB_CONF)" >> $MKNAME
50
51 # create TBox file for the test suit
52 cp $2 $TBOXNAME
53
54 # create Config file for the test suit
55 cp $OFP/options.default $CONFNAME
56 cat $OFP/query.default >> $CONFNAME
57 echo "TBox = $1.tbox" >> $CONFNAME
58 echo >> $CONFNAME
59
60 echo "Finished!"