annotate OPPL/FaCT++-linux-v1.5.2/Models.lisp/create-new-test @ 12:d0722148cb59

XML file improved for consistency
author Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
date Thu, 22 Mar 2012 14:37:46 +0100
parents 40adbcb2a7cc
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
8
40adbcb2a7cc Added merge function and FaCT++ support. Improved OBO render
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
1 #!/bin/bash
40adbcb2a7cc Added merge function and FaCT++ support. Improved OBO render
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
2
40adbcb2a7cc Added merge function and FaCT++ support. Improved OBO render
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
3 # Script for creating new test-suit.
40adbcb2a7cc Added merge function and FaCT++ support. Improved OBO render
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
4 # In parameters: <suit-name> <source-tbox>
40adbcb2a7cc Added merge function and FaCT++ support. Improved OBO render
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
5 # output:
40adbcb2a7cc Added merge function and FaCT++ support. Improved OBO render
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
6 # - create <suit-name> directory
40adbcb2a7cc Added merge function and FaCT++ support. Improved OBO render
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
7 # - copy <source-tbox> into <suit-name>/<suit-name>.tbox
40adbcb2a7cc Added merge function and FaCT++ support. Improved OBO render
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
8 # - create Makefile and conf-file
40adbcb2a7cc Added merge function and FaCT++ support. Improved OBO render
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
9
40adbcb2a7cc Added merge function and FaCT++ support. Improved OBO render
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
10 # file names
40adbcb2a7cc Added merge function and FaCT++ support. Improved OBO render
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
11 MKNAME=./$1/Makefile
40adbcb2a7cc Added merge function and FaCT++ support. Improved OBO render
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
12 TBOXNAME=./$1/$1.tbox
40adbcb2a7cc Added merge function and FaCT++ support. Improved OBO render
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
13 CONFNAME=./$1/$1.conf
40adbcb2a7cc Added merge function and FaCT++ support. Improved OBO render
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
14
40adbcb2a7cc Added merge function and FaCT++ support. Improved OBO render
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
15 # .orig files path
40adbcb2a7cc Added merge function and FaCT++ support. Improved OBO render
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
16 OFP=.
40adbcb2a7cc Added merge function and FaCT++ support. Improved OBO render
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
17
40adbcb2a7cc Added merge function and FaCT++ support. Improved OBO render
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
18 Usage()
40adbcb2a7cc Added merge function and FaCT++ support. Improved OBO render
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
19 {
40adbcb2a7cc Added merge function and FaCT++ support. Improved OBO render
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
20 echo
40adbcb2a7cc Added merge function and FaCT++ support. Improved OBO render
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
21 echo "Usage: create-new-test <suit-name> <source-tbox>"
40adbcb2a7cc Added merge function and FaCT++ support. Improved OBO render
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
22 echo " where: <suit-name> -- unique name for new suit"
40adbcb2a7cc Added merge function and FaCT++ support. Improved OBO render
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
23 echo " <source-tbox> -- test TBox file"
40adbcb2a7cc Added merge function and FaCT++ support. Improved OBO render
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
24 exit 1
40adbcb2a7cc Added merge function and FaCT++ support. Improved OBO render
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
25 }
40adbcb2a7cc Added merge function and FaCT++ support. Improved OBO render
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
26
40adbcb2a7cc Added merge function and FaCT++ support. Improved OBO render
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
27 Fatal()
40adbcb2a7cc Added merge function and FaCT++ support. Improved OBO render
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
28 {
40adbcb2a7cc Added merge function and FaCT++ support. Improved OBO render
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
29 echo "Fatal: directory $1 already exists"
40adbcb2a7cc Added merge function and FaCT++ support. Improved OBO render
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
30 exit 1
40adbcb2a7cc Added merge function and FaCT++ support. Improved OBO render
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
31 }
40adbcb2a7cc Added merge function and FaCT++ support. Improved OBO render
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
32
40adbcb2a7cc Added merge function and FaCT++ support. Improved OBO render
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
33 # check for the parameters
40adbcb2a7cc Added merge function and FaCT++ support. Improved OBO render
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
34 if test "$1" = ""; then
40adbcb2a7cc Added merge function and FaCT++ support. Improved OBO render
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
35 Usage
40adbcb2a7cc Added merge function and FaCT++ support. Improved OBO render
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
36 elif test "$2" = ""; then
40adbcb2a7cc Added merge function and FaCT++ support. Improved OBO render
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
37 Usage
40adbcb2a7cc Added merge function and FaCT++ support. Improved OBO render
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
38 fi
40adbcb2a7cc Added merge function and FaCT++ support. Improved OBO render
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
39
40adbcb2a7cc Added merge function and FaCT++ support. Improved OBO render
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
40 # create new subdir
40adbcb2a7cc Added merge function and FaCT++ support. Improved OBO render
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
41 mkdir $1 || Fatal
40adbcb2a7cc Added merge function and FaCT++ support. Improved OBO render
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
42
40adbcb2a7cc Added merge function and FaCT++ support. Improved OBO render
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
43 # create Makefile for the test suit
40adbcb2a7cc Added merge function and FaCT++ support. Improved OBO render
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
44 cp $OFP/Makefile.default $MKNAME
40adbcb2a7cc Added merge function and FaCT++ support. Improved OBO render
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
45 echo "KB_CONF = $1.conf" >> $MKNAME
40adbcb2a7cc Added merge function and FaCT++ support. Improved OBO render
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
46 echo "KB = $1.tbox" >> $MKNAME
40adbcb2a7cc Added merge function and FaCT++ support. Improved OBO render
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
47 echo >> $MKNAME
40adbcb2a7cc Added merge function and FaCT++ support. Improved OBO render
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
48 echo "sat classify:" >> $MKNAME
40adbcb2a7cc Added merge function and FaCT++ support. Improved OBO render
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
49 echo " FaCT++ \$(KB_CONF)" >> $MKNAME
40adbcb2a7cc Added merge function and FaCT++ support. Improved OBO render
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
50
40adbcb2a7cc Added merge function and FaCT++ support. Improved OBO render
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
51 # create TBox file for the test suit
40adbcb2a7cc Added merge function and FaCT++ support. Improved OBO render
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
52 cp $2 $TBOXNAME
40adbcb2a7cc Added merge function and FaCT++ support. Improved OBO render
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
53
40adbcb2a7cc Added merge function and FaCT++ support. Improved OBO render
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
54 # create Config file for the test suit
40adbcb2a7cc Added merge function and FaCT++ support. Improved OBO render
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
55 cp $OFP/options.default $CONFNAME
40adbcb2a7cc Added merge function and FaCT++ support. Improved OBO render
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
56 cat $OFP/query.default >> $CONFNAME
40adbcb2a7cc Added merge function and FaCT++ support. Improved OBO render
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
57 echo "TBox = $1.tbox" >> $CONFNAME
40adbcb2a7cc Added merge function and FaCT++ support. Improved OBO render
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
58 echo >> $CONFNAME
40adbcb2a7cc Added merge function and FaCT++ support. Improved OBO render
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
59
40adbcb2a7cc Added merge function and FaCT++ support. Improved OBO render
Mikel Egaña Aranguren <mikel-egana-aranguren@toolshed.g2.bx.psu.edu>
parents:
diff changeset
60 echo "Finished!"