Changeset 2012

Show
Ignore:
Timestamp:
01/06/09 11:43:16
Author:
douglm
Message:

Install now runs to completion with a fresh empty system installed

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/build/quickstart/install.xml

    r2008 r2012  
    1616    <property name="org.bedework.directory.dir" 
    1717              location="${org.bedework.project.bedework}/../apacheds-1.5.3.fixed" /> 
     18 
     19    <property name="org.bedework.hsqldb.dir" 
     20              location="${org.bedework.project.bedework}/../hsqldb-1.7.3.3" /> 
    1821  </target> 
    1922 
     
    124127  </target> 
    125128 
     129  <target name="create-newsys" depends="run.init" 
     130          description="Create the new empty bedework system"> 
     131    <!-- This target assumes an unwrapped dump/restore at dist/temp/dumpres --> 
     132 
     133    <!-- Remove the hsqldb data file. It wil create an empty one --> 
     134 
     135    <delete dir="${org.bedework.hsqldb.dir}/demo" verbose="yes" /> 
     136 
     137    <property name="org.bedework.dumpres.unzipdir" 
     138              location="${org.bedework.project.bedework}/dist/temp/dumpres" /> 
     139 
     140    <parallel> 
     141      <daemons> 
     142        <antcall target="hsqldb" inheritrefs="true" /> 
     143      </daemons> 
     144      <sequential> 
     145        <echo message="Wait for the db to start" /> 
     146        <sleep seconds="5" /> 
     147 
     148        <path id="dumpres.class.path"> 
     149          <pathelement location="${org.bedework.dumpres.unzipdir}/classes/"/> 
     150          <pathelement location="${org.bedework.dumpres.unzipdir}/resources/"/> 
     151          <fileset dir="${org.bedework.dumpres.unzipdir}/lib"> 
     152            <include name="**/*"/> 
     153          </fileset> 
     154        </path> 
     155 
     156        <java fork="true" dir="${org.bedework.dumpres.unzipdir}" 
     157              classname="org.hibernate.tool.hbm2ddl.SchemaExport"> 
     158          <classpath refid="dumpres.class.path" /> 
     159          <arg value="--create"/> 
     160          <arg value="--format"/> 
     161          <arg value="--delimiter=;"/> 
     162          <arg value="--config=/hibernate.cfg.xml"/> 
     163          <arg value="--output=schema.sql"/> 
     164        </java> 
     165 
     166        <java fork="true" dir="${org.bedework.dumpres.unzipdir}" 
     167              classname="org.bedework.dumprestore.restore.Restore"> 
     168          <classpath refid="dumpres.class.path" /> 
     169          <arg value="-appname"/> 
     170          <arg value="dumpres"/> 
     171          <arg value="-newSystem"/> 
     172          <arg value="-rootid"/> 
     173          <arg value="${org.bedework.newsys.rootid}"/> 
     174        </java> 
     175      </sequential> 
     176    </parallel> 
     177  </target> 
     178 
    126179  <target name="getUserInfo"> 
    127180    <input message="Account name:" 
  • trunk/build/quickstart/linux/install

    r2011 r2012  
    138138$qsantrunner $adduser_defs $ant_class_def addUser 
    139139 
    140 exit 2 
     140
     141# Now unzip the dump/restore package and run it to initialise the system 
     142
    141143 
    142 $qsant addUserPrompt 
     144cd $BEDEWORK_HOME/dist 
     145rm -r temp 
     146mkdir temp 
     147cd temp 
     148unzip ../dumpres.zip 
     149cd dumpres 
     150chmod +x bwrun 
    143151 
    144   DIRTOOL_HOME=$BEDEWORK_HOME/projects/bwtools 
    145   DIRTOOL_CP=$libcache/commons-codec-1.3.jar:$libcache/log4j-1.2.8.jar 
    146   DIRTOOL_CP=$DIRTOOL_CP:$BEDEWORK_HOME/dist/bw-tools-3.5.jar 
    147   dirtool="$JAVA_HOME/bin/java -classpath $DIRTOOL_CP org.bedework.tools.directory.DirTool" 
     152cd $QUICKSTART_HOME 
    148153 
    149 #  $dirtool -initSystem 
    150 superuser 
    151   superuser= 
    152   until [ "$superuser" != "" ] ; do 
    153     echo "Enter superuser account" 
    154     read superuser 
    155  
    156     if [ "$superuser" != "" ] ; then 
    157       $dirtool -userExists $superuser 
    158       dirstat=$? 
    159       echo "status is $dirstat" 
    160       if [ "$dirstat" != "0" ] ; then 
    161         echo "user $superuser does not exist" 
    162         superuser= 
    163       fi 
    164     fi 
    165   done 
    166  
    167  
    168  
    169   echo "create data" 
     154$qsantrunner "-Dorg.bedework.newsys.rootid=$rootAccount" $ant_class_def create-newsys