--- bootstrap.sh 2003-07-20 10:28:36.000000000 +1000 +++ bootstrap.sh.mc 2003-07-21 18:39:24.000000000 +1000 @@ -9,7 +9,16 @@ # # ================================= # -LOGFILE=`pwd`/TWikiInstaller.log`date +%F-%H%M` +TOPDIR=`pwd`; +SUPPLIEDCONFIGFILE=$TOPDIR/twiki.system-config +INSTALLSTAMP=`date +%F-%H%M` +LOGFILE=$TOPDIR/TWikiInstaller.$INSTALLSTAMP.log + +PATCH=`which patch` +if [ ! -f "$PATCH" ]; then + echo "Please install patch " + exit 1 +fi echo "TWiki Bootstrap Installer" | tee -a $LOGFILE echo "=========================" | tee -a $LOGFILE @@ -59,7 +68,7 @@ # Prepare installation location #================================================================================ # Changed date format to that of TWiki:Main.MattWilkie -BUILD=alpha`date +%F-%H%M` +BUILD=alpha$INSTALLSTAMP mkdir -p $BUILD/twiki 2>&1 | tee -a $LOGFILE cd $BUILD/twiki pwd >/etc/twiki @@ -81,12 +90,20 @@ OS=`uname` cd `cat /etc/twiki` cd etc/defaults -if [ -f twiki.system-config.$OS ]; then - echo "Using custom $OS defaults for your system" | tee -a $LOGFILE - cp twiki.system-config.$OS ../twiki.system-config +if [ ! -f "$SUPPLIEDCONFIGFILE" ]; then + echo "The file "$SUPPLIEDCONFIGFILE" does not exist, using defaults" + if [ -f twiki.system-config.$OS ]; then + echo "Using custom $OS defaults for your system" | tee -a $LOGFILE + cp twiki.system-config.$OS ../twiki.system-config + else + echo "Using standard defaults for your system" | tee -a $LOGFILE + fi else - echo "Using standard defaults for your system" | tee -a $LOGFILE + echo "Using the file "$SUPPLIEDCONFIGFILE" you supplied" + cp $SUPPLIEDCONFIGFILE ../twiki.system-config | tee -a $LOGFILE fi + + cd `cat /etc/twiki` # Run the Installer