Differences From Artifact [0fc79c2700]:

To Artifact [1cae376587]:


13
14
15
16
17
18
19



20
21
22
23
24
25
26
# Copyright (C) 2001 by Peter J. Gawthrop

###############################################################
## Version control history
###############################################################
## $Header$
## $Log$



## Revision 1.331  2002/04/19 09:24:29  gawthrop
## 2 changes to ode2odes_out generation: only compiles the specified c
## file; outside the computation=c clause
##
## Revision 1.330  2002/04/17 10:03:12  geraint
## Marked .sg as a major representation.
##







>
>
>







13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Copyright (C) 2001 by Peter J. Gawthrop

###############################################################
## Version control history
###############################################################
## $Header$
## $Log$
## Revision 1.332  2002/04/26 23:19:00  geraint
## Fixed path to info files for "mtt info".
##
## Revision 1.331  2002/04/19 09:24:29  gawthrop
## 2 changes to ode2odes_out generation: only compiles the specified c
## file; outside the computation=c clause
##
## Revision 1.330  2002/04/17 10:03:12  geraint
## Marked .sg as a major representation.
##
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
  rm -fr MTT_work
  exit
fi

# Recursively clean up
if [ "$1" = "rclean" ]; then
  echo 'Removing intermediate files recursively'
  dir2paths '.' | awk '{print "mtt -q -d " $1 " clean " $2}' | sh
  exit
fi

# The big clean up
if [ "$1" = "Clean" ] && [ "$2" = "" ]; then
  echo 'Removing all generated files for all systems'
  rm -f *.log  mtt_info.txt warning.txt







|







1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
  rm -fr MTT_work
  exit
fi

# Recursively clean up
if [ "$1" = "rclean" ]; then
  echo 'Removing intermediate files recursively'
  dir2paths '.' | gawk '{print "mtt -q -d " $1 " clean " $2}' | sh
  exit
fi

# The big clean up
if [ "$1" = "Clean" ] && [ "$2" = "" ]; then
  echo 'Removing all generated files for all systems'
  rm -f *.log  mtt_info.txt warning.txt
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
     documenttype=article
      # See if we are making a book -- ie representation rep on a directory
     isMTT_work=`pwd | grep 'MTT_work'`
      if [ -n "$isMTT_work" ]; then
	dotdot='../'
      fi  
  
     #isdirectory=`file $dotdot$1 | awk '{print $2}' | grep directory`
     if [ -d "$dotdot$1" ]; then
	documenttype=book
     fi
else
     documenttype=section
fi








|







1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
     documenttype=article
      # See if we are making a book -- ie representation rep on a directory
     isMTT_work=`pwd | grep 'MTT_work'`
      if [ -n "$isMTT_work" ]; then
	dotdot='../'
      fi  
  
     #isdirectory=`file $dotdot$1 | gawk '{print $2}' | grep directory`
     if [ -d "$dotdot$1" ]; then
	documenttype=book
     fi
else
     documenttype=section
fi

1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
      echo Component $name exists already - no action taken
    fi
  else
    if [ $source = "." ]; then
      cp -u *_*.* ${destination}
    else
      comp_path=`mtt_find $source $2 path_only`
      n_found=`echo $comp_path | wc | awk '{print $2}'`

      if [ "$n_found" = "1" ]; then
         echo Copying $2 from $comp_path to ${destination}
         cp $comp_path/*_*.* ${destination}
         exit 0
      elif [ "$n_found" = "0" ]; then
	if [ "$quiet" != "quiet" ]; then    







|







1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
      echo Component $name exists already - no action taken
    fi
  else
    if [ $source = "." ]; then
      cp -u *_*.* ${destination}
    else
      comp_path=`mtt_find $source $2 path_only`
      n_found=`echo $comp_path | wc | gawk '{print $2}'`

      if [ "$n_found" = "1" ]; then
         echo Copying $2 from $comp_path to ${destination}
         cp $comp_path/*_*.* ${destination}
         exit 0
      elif [ "$n_found" = "0" ]; then
	if [ "$quiet" != "quiet" ]; then    
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044

if [ -n "$sensitivity" ]; then
  sys_s=`echo $1 | cut -c 2-`
  sys_abg=${sys_s}_abg
fi

## Check octave version
case `$MATRIX --version | awk -F\. '{print $2}'` in
    0) define_octave_dev="";;			# stable 
    1) define_octave_dev="-DOCTAVE_DEV";;	# development
    *) define_octave_dev="-DOCTAVE_DEV";;
esac

################################
# This is the main mtt programme







|







2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047

if [ -n "$sensitivity" ]; then
  sys_s=`echo $1 | cut -c 2-`
  sys_abg=${sys_s}_abg
fi

## Check octave version
case `$MATRIX --version | gawk -F\. '{print $2}'` in
    0) define_octave_dev="";;			# stable 
    1) define_octave_dev="-DOCTAVE_DEV";;	# development
    *) define_octave_dev="-DOCTAVE_DEV";;
esac

################################
# This is the main mtt programme

MTT: Model Transformation Tools
GitHub | SourceHut | Sourceforge | Fossil RSS ]