Overview
Comment:Changed regexp to /\(.*$old.*=\)/
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: f9186a43e52a32987b45714dba5d5523f8507f18de96f93ad2a61c32106470d5
User & Date: gawthrop@users.sourceforge.net on 2000-10-13 09:28:16
Other Links: branch diff | manifest | tags
Context
2000-10-13
09:55:09
Changed state/input name to $4_$3 check-in: 719bce53c9 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
09:28:16
Changed regexp to /\(.*$old.*=\)/ check-in: f9186a43e5 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
08:56:51
Output variables as column, not row. check-in: 8c246d66b2 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/trans/mtt_update from [a9f2485880] to [3fbe058cb1].

9
10
11
12
13
14
15



16
17
18
19
20
21
22
# Copyright (C) 2000 by Peter J. Gawthrop

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$



## Revision 1.6  2000/10/13 08:07:24  peterg
## Added state and input - it checks against sympar as well so that
## defined variables may be used here.
##
## Revision 1.5  2000/10/12 19:24:55  peterg
## Corrected output message
##







>
>
>







9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# Copyright (C) 2000 by Peter J. Gawthrop

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.7  2000/10/13 08:56:51  peterg
## Output variables as column, not row.
##
## Revision 1.6  2000/10/13 08:07:24  peterg
## Added state and input - it checks against sympar as well so that
## defined variables may be used here.
##
## Revision 1.5  2000/10/12 19:24:55  peterg
## Corrected output message
##
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
	    textfile=$1_$2.$ext
	    infofile=mtt_list.$ext
	    moreinfofile=mtt_list_numpar.$ext
	    grep "$rep" <$1_struc.txt |\
	    awk '{printf("%s_%s_%s\n", $4, $5, $3)}' \
             > $infofile 
	    cat $infofile $1_sympar.$ext> $moreinfofile  
	    default='1.0'
	;;
    *)
	    echo Representation $rep not implemented
	    exit
esac

if [ -f "$textfile" ]; then







|







64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
	    textfile=$1_$2.$ext
	    infofile=mtt_list.$ext
	    moreinfofile=mtt_list_numpar.$ext
	    grep "$rep" <$1_struc.txt |\
	    awk '{printf("%s_%s_%s\n", $4, $5, $3)}' \
             > $infofile 
	    cat $infofile $1_sympar.$ext> $moreinfofile  
	    default='0.0'
	;;
    *)
	    echo Representation $rep not implemented
	    exit
esac

if [ -f "$textfile" ]; then
136
137
138
139
140
141
142

143

144
145
146
147
148
149
150
  while [ -z "$answered" ]; do
    echo "Update $textfile (y/n)?"
    read answer < /dev/tty
    case $answer in
	y)
	    answered=yes
 	    for old in $in_text; do

	      sed "s/\($old[ \t]*=\)/## Removed by MTT on `date`: \1/" <$textfile > mtt_tmp

              mv mtt_tmp $textfile
              changed=yes
	    done
	    ;;
	n)
	    answered=yes
	    ;;







>
|
>







139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
  while [ -z "$answered" ]; do
    echo "Update $textfile (y/n)?"
    read answer < /dev/tty
    case $answer in
	y)
	    answered=yes
 	    for old in $in_text; do
              echo $old
	      sed "s/\(.*$old.*=\)/## Removed by MTT on `date`: \1/"\
               <$textfile > mtt_tmp
              mv mtt_tmp $textfile
              changed=yes
	    done
	    ;;
	n)
	    answered=yes
	    ;;


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