Overview
Comment:Ignore component aliases (with /)
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 4b4c991201b5e7bf48273eb86b6b774ecba147f5e02bb13b0933821479901434
User & Date: gawthrop@users.sourceforge.net on 1998-07-17 16:31:37.000
Other Links: branch diff | manifest | tags
Context
1998-07-17
16:45:00
Alias for hPipe check-in: eb8d9c0fb9 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
16:31:37
Ignore component aliases (with /) check-in: 4b4c991201 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
08:27:33
Added find target check-in: 3f2a5e3d2b user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes
︙︙
10
11
12
13
14
15
16



17
18
19
20
21
22
23
# Copyright (c) P.J.Gawthrop 1998

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



## Revision 1.3  1998/07/03 13:49:03  peterg
## Flips the order of alias and name when $ is involved.
##
## Revision 1.2  1998/07/03 07:54:39  peterg
## Tidied
##
## Revision 1.1  1998/07/02 09:22:10  peterg







>
>
>







10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Copyright (c) P.J.Gawthrop 1998

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.4  1998/07/03 15:21:26  peterg
## Replace sub by gsub -- need to replace ALL ,
##
## Revision 1.3  1998/07/03 13:49:03  peterg
## Flips the order of alias and name when $ is involved.
##
## Revision 1.2  1998/07/03 07:54:39  peterg
## Tidied
##
## Revision 1.1  1998/07/02 09:22:10  peterg
︙︙
37
38
39
40
41
42
43

44
45
46
47
48
49
50
51
52
53
54

55
56
57
58
59
60
61
62
63
64
65
66
#Create the alias file complete with headers.
echo "# Alias file ($1_alias.txt)" > $1_alias.txt
echo "# Generated by MTT at `date`" >> $1_alias.txt

#Write out the variables 
    grep '[%|#]ALIAS' $1_lbl.txt |\
    awk '{

      if (match($2,"\\$")==0){
        alias=$2; name =$3
      }
      else{
        alias=$3; name =$2
      }
      gsub(",","__",alias); #Replace ,
      n=split(alias,a,"|");
      for (i=1; i<=n; i++)
        print a[i] "\t" name;
	 }

      END{
      print "###_END_OF_ALIAS_###"
     }' >> $1_alias.txt
















>
|
|
|
|
|
|
|
|
|
|
|
>












40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#Create the alias file complete with headers.
echo "# Alias file ($1_alias.txt)" > $1_alias.txt
echo "# Generated by MTT at `date`" >> $1_alias.txt

#Write out the variables 
    grep '[%|#]ALIAS' $1_lbl.txt |\
    awk '{
      if (match($2,"/")==0){
        if (match($2,"\\$")==0){
          alias=$2; name =$3
        }
        else{
          alias=$3; name =$2
        }
        gsub(",","__",alias); #Replace ,
        n=split(alias,a,"|");
        for (i=1; i<=n; i++)
          print a[i] "\t" name;
	   }
      }
      END{
      print "###_END_OF_ALIAS_###"
     }' >> $1_alias.txt










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