scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | README | LICENSE

0024-extract.sh (394B)


      1 #!/bin/sh
      2 
      3 set -e
      4 
      5 tmp1=`mktemp`
      6 tmp2=`mktemp`
      7 
      8 trap "rm -f file* $tmp1 $tmp2" 0 2 3 15
      9 
     10 ############################################################################
     11 #extract 3rd member
     12 
     13 cp master.a file.a
     14 $EXEC scc ar -xv file.a file3
     15 
     16 cat <<EOF > $tmp1
     17 and at the end, this is the last file
     18 that should go at the end of the file,
     19 thus it should go in the third position.
     20 EOF
     21 
     22 cmp file3 $tmp1