Index: mttroot/mtt/bin/mtt_backup ================================================================== --- mttroot/mtt/bin/mtt_backup +++ mttroot/mtt/bin/mtt_backup @@ -22,12 +22,14 @@ done #Name of archive if [ -z "$1" ]; then mtt="mtt" + dirs='mtt mtt-lib mtt-cc mtt-doc' else mtt="mtt-$1" + dirs=$mtt fi ## Create appropriate filename case $format in date) @@ -45,31 +47,28 @@ echo Backup file $filename -#Files to backup -dir=$mtt - #Check whether archive exists here if [ -f "$filename" ]; then echo File $filename already exists - exiting exit fi # Listing files to ignore -echo Finding irrelevant files -find $dir -name '*.*' -print |\ - grep 'dvi$\|ps$\|pdf$\|html$\|info$\|gif$\|log$\|dat$\|MTT_work\|core\|~$' >IGNORE -wc IGNORE | awk '{print "Ignoring", $1, "files"}' +#echo Finding irrelevant files +#find $dirs -name '*.*' -print |\ +# grep 'dvi$\|ps$\|gif$\|log$\|dat$\|MTT_work\|core\|~$' >IGNORE +#wc IGNORE | awk '{print "Ignoring", $1, "files"}' #echo examples >> IGNORE #Inform user -echo Backing up $dir to $filename +echo Backing up $dirs to $filename #Tar the files -tar --exclude-from IGNORE --create --gzip --file $filename $dir - +#tar --exclude-from IGNORE --create --gzip --file $filename $dir +tar --create --gzip --file $filename $dirs #Size info ls -l $filename # Index: mttroot/mtt/bin/mtt_backups ================================================================== --- mttroot/mtt/bin/mtt_backups +++ mttroot/mtt/bin/mtt_backups @@ -1,12 +1,16 @@ #!/bin/sh # Does a backup with date of all mtt components # $Log$ +# Revision 1.2 2000/10/03 12:17:58 peterg +# Prints usage line +# if [ -z "$1" ]; then echo "Usage: mtt_backups [-v|-d]" exit fi mtt_backup $1 +mtt_backup $1 cc mtt_backup $1 lib mtt_backup $1 doc Index: mttroot/mtt/bin/mtt_check_var ================================================================== --- mttroot/mtt/bin/mtt_check_var +++ mttroot/mtt/bin/mtt_check_var @@ -13,22 +13,26 @@ ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ +# Revision 1.2 1997/12/04 10:41:15 peterg +# Added third argument to print env. variables. +# ## Revision 1.1 1997/07/27 13:11:37 peterg ## Initial revision ## ############################################################### var=$1 name=$2 print=$3 +software=$4 if [ -z "$1" ]; then - echo '***** Environment variable' $name 'not set. *****' - echo 'Check that mttrc or mttrc.csh has been invoked.' + echo '*** MTT WARNING Environment variable' $name 'not set. *****' + echo "Please check that software package $software has been correctely installed" echo exit fi if [ "$print" = "print" ]; then Index: mttroot/mtt/bin/mtt_check_vars ================================================================== --- mttroot/mtt/bin/mtt_check_vars +++ mttroot/mtt/bin/mtt_check_vars @@ -13,10 +13,13 @@ ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ +## Revision 1.7 2000/08/04 15:48:30 peterg +## Added PDF +## ## Revision 1.6 2000/05/22 12:37:24 peterg ## *** empty log message *** ## ## Revision 1.5 2000/05/22 12:34:07 peterg ## Added MTT_REP @@ -56,13 +59,13 @@ #mtt_check_var "$TEXFONTS" "TEXFONTS" "$print" "LaTeX" # MTT variables mtt_check_var "$MAKE" "MAKE" "$print" "MTT" mtt_check_var "$MTTPATH" "MTTPATH" "$print" "MTT" -mtt_check_var "$MTT_COMPONENTS" "MTT_CRS" "$print" "MTT" +mtt_check_var "$MTT_CRS" "MTT_CRS" "$print" "MTT" mtt_check_var "$MTT_COMPONENTS" "MTT_COMPONENTS" "$print" "MTT" -mtt_check_var "$MTT_COMPONENTS" "MTT_EXAMPLES" "$print" "MTT" +mtt_check_var "$MTT_EXAMPLES" "MTT_EXAMPLES" "$print" "MTT" mtt_check_var "$MTT_LIB" "MTT_LIB" "$print" "MTT" mtt_check_var "$MTT_REP" "MTT_REP" "$print" "MTT" mtt_check_var "$MATRIX" "MATRIX" "$print" "MTT" mtt_check_var "$SYMBOLIC" "SYMBOLIC" "$print" "MTT" mtt_check_var "$FIG" "FIG" "$print" "MTT" Index: mttroot/mtt/bin/mtt_rename ================================================================== --- mttroot/mtt/bin/mtt_rename +++ mttroot/mtt/bin/mtt_rename @@ -12,10 +12,13 @@ ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ +## Revision 1.4 1998/08/15 13:50:22 peterg +## Doesn't zap preexisting files +## ## Revision 1.3 1998/08/14 15:37:38 peterg ## rename now copies - no delete ## ## Revision 1.2 1998/01/06 13:57:39 peterg ## Now removes old version after copying @@ -27,17 +30,17 @@ old_name=$1 new_name=$2 extension=$3 +left='[^a-zA-z]' +right=$left if [ -f "$new_name$extension" ]; then echo "$new_name$extension \t already exists -- no action taken" exit fi if ls $old_name$extension > /dev/null 2>&1 then echo Renaming $old_name$extension to $new_name$extension - sed "s/$old_name/$new_name/g" <$old_name$extension >$new_name$extension - - #rm -f $old_name$extension - fi + sed "s/\($left\)$old_name\($right\)/\1$new_name\2/g" <$old_name$extension >$new_name$extension +fi Index: mttroot/mtt/bin/mtt_version ================================================================== --- mttroot/mtt/bin/mtt_version +++ mttroot/mtt/bin/mtt_version @@ -13,21 +13,29 @@ ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ +## Revision 1.3 1999/12/20 02:08:38 peterg +## Added second arg option +## ## Revision 1.2 1998/05/28 09:31:44 peterg ## Cosmetic changes ## ## Revision 1.1 1998/05/28 09:31:13 peterg ## Initial revision ## ############################################################### - if [ -z "$2" ]; then - echo $1: `$1 --version | head -1` + echo Trying $1 ... + ver=`$1 --version | head -1` + if [ -n "$ver" ]; then + echo is OK and has version $ver. + else + echo Either $1 does not exist or is not the GNU version. + fi else echo $1: $2 fi Index: mttroot/mtt/bin/mttrc ================================================================== --- mttroot/mtt/bin/mttrc +++ mttroot/mtt/bin/mttrc @@ -13,10 +13,13 @@ ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ +## Revision 1.13 2000/10/03 12:12:14 peterg +## New path structure to account for three way split in mtt tree +## ## Revision 1.12 2000/09/18 12:17:07 peterg ## Now includes to control system toolbox in OCTAVE_PATH ## Don't use -path stuff - use :: instead. ## ## Revision 1.11 2000/05/21 17:55:15 peterg @@ -66,17 +69,18 @@ # Setup the paths export MTTPATH=$MTT_BASE/mtt export MTT_LIB=$MTT_BASE/mtt-lib export MTT_DOC=$MTT_BASE/mtt-doc +export MTT_CC=$MTT_BASE/mtt-cc export MTT_COMPONENTS=$MTT_LIB/comp export MTT_CRS=$MTT_LIB/cr -export MTT_EXAMPLES=$MTT_LIB/mtt_examples +export MTT_EXAMPLES=$MTT_LIB/examples export MTT_REP=$MTT_LIB/rep -export PATH=$PATH\:$MTTPATH\:$MTTPATH/trans +export PATH=$PATH\:$MTTPATH\:$MTTPATH/trans\:$MTT_CC #Setup octave export MATRIX_PATH=$MTTPATH/trans/m// export MATRIX_PATH=$MATRIX_PATH\:$MTT_LIB/comp/simple// export MATRIX_PATH=$MATRIX_PATH\:$MTT_LIB/control// @@ -111,14 +115,18 @@ # Setup dvi viewer export DVIVIEW='xdvi' # Setup latex2html -export LATEX2HTML="latex2html -contents_in_navigation -index_in_navigation -address http://www.mech.gla.ac.uk/~peterg/software/MTT" +export LATEX2HTML="latex2html -contents_in_navigation -index_in_navigation -address http://mtt.sourceforge.net" # Ascend stuff export ASCENDLIBRARY=$MTTPATH/ascend/lib + +# Oct file generation - use version with no optimisation. +export MKOCTFILE=$MTT_LIB/octave/mkoctfile +