diff options
| author | Mark Adler <madler@alumni.caltech.edu> | 2011-09-09 23:21:47 -0700 |
|---|---|---|
| committer | Mark Adler <madler@alumni.caltech.edu> | 2011-09-09 23:21:47 -0700 |
| commit | 7c2a874e50b871d04fbd19501f7b42cff55e5abc (patch) | |
| tree | 1879cd29182ababb17cde77cee5ce74505db4006 /aix/mkexps | |
| parent | a383133c4e7b93113cee912f213cf9502d785fa7 (diff) | |
| download | zlib-1.2.0.tar.gz zlib-1.2.0.tar.bz2 zlib-1.2.0.zip | |
zlib 1.2.0v1.2.0
Diffstat (limited to 'aix/mkexps')
| -rw-r--r-- | aix/mkexps | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/aix/mkexps b/aix/mkexps new file mode 100644 index 00000000..6c55eae5 --- /dev/null +++ b/aix/mkexps | |||
| @@ -0,0 +1,37 @@ | |||
| 1 | #!/bin/ksh | ||
| 2 | # | ||
| 3 | # mkexps - make export list | ||
| 4 | # This program creates an export list by combining all the "." and normal names | ||
| 5 | # into one list. | ||
| 6 | # | ||
| 7 | if [[ "$#" -ne 1 ]] | ||
| 8 | then | ||
| 9 | print "Usage: mkexps ArchiveFile" | ||
| 10 | exit -2 | ||
| 11 | fi | ||
| 12 | if [[ ! -f $1 ]] | ||
| 13 | then | ||
| 14 | print "mkexps: Cannot open file \"$1\"" | ||
| 15 | exit -1 | ||
| 16 | fi | ||
| 17 | |||
| 18 | dump -g $1 | awk ' | ||
| 19 | BEGIN { | ||
| 20 | top = 1 | ||
| 21 | } | ||
| 22 | /^[ ]*[0-9][0-9]*/ { | ||
| 23 | if ( (n = index( $2, "." )) > 0 ) { | ||
| 24 | export_array[ top++ ] = substr( $2, n+1, length( $2 )) | ||
| 25 | } | ||
| 26 | else { | ||
| 27 | export_array[ top++ ] = $2 | ||
| 28 | } | ||
| 29 | } | ||
| 30 | |||
| 31 | END { | ||
| 32 | for ( i = 1; i < top; i++ ) | ||
| 33 | { | ||
| 34 | print export_array[ i ] | ||
| 35 | } | ||
| 36 | |||
| 37 | }' | sort | uniq | ||
