summaryrefslogtreecommitdiff
path: root/bin/aix_shr
blob: a19ae9fe8d56b2976228c44549a7f9639d0190a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/sh
# $Id$
# Filter out the duplicate symbol warnings from Visual Age C++
#

output=`basename $0`.$$.`/bin/date +%Y%m%d%H%M%S`
usrtmp="/tmp"
for possible in "$TMPDIR" "$TEMP" "$TMP"; do
  if [ "$possible" != "" ]; then
    if [ -w "$possible" ]; then
      usrtmp="$possible"
      break
    fi
  fi
done

## Send the output to a temporary file and save the return code
$@ > "$usrtmp/$output" 2>&1
status=$?

## Print the output to stdout, but filter duplicate symbol warnings
/bin/egrep -v '0711-(224|345)' "$usrtmp/$output"

## Clean up the temporary file
/bin/rm -f "$usrtmp/$output"

## Exit with the return code from the compiler
exit $status