File: after_test.sh

package info (click to toggle)
mcpp 2.7.1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 8,024 kB
  • ctags: 29,151
  • sloc: ansic: 35,191; sh: 9,231; makefile: 176; cpp: 84; exp: 18
file content (34 lines) | stat: -rwxr-xr-x 626 bytes parent folder | download | duplicates (6)
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
29
30
31
32
33
34
#!/bin/sh
## ./after_test.sh $CC $gcc_path $cpp_call $target_cc

CC=$1
gcc_path=`expr $2 : "\(.*\)/${CC}\$"`
target_cc=$4
if test x$target_cc != x; then
    CC=$target_cc
fi
cpp_name=`echo $3 | sed 's,.*/,,'`
cpp_path=`echo $3 | sed "s,/$cpp_name,,"`

echo "  cd $cpp_path"
cd "$cpp_path"
echo "  removing '-23j' options from mcpp invocation"
for i in mcpp*.sh
do
    cat $i | sed 's/mcpp -23j/mcpp/' > tmp
    mv -f tmp $i
    chmod a+x $i
done

if test $CC = gcc; then
    exit 0
fi

echo "  cd $gcc_path"
cd "$gcc_path"
echo "  rm gcc"
rm gcc
if test -f "gcc.save"; then
    echo "  mv gcc.save gcc"
    mv gcc.save gcc
fi