scc

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

0017-print.sh (533B)


      1 #!/bin/sh
      2 
      3 set -e
      4 
      5 trap 'rm -f file.a $tmp1' EXIT
      6 trap 'exit $?' HUP INT TERM
      7 
      8 tmp1=tmp1.$$
      9 
     10 #and now with no members in command line
     11 cp master.a file.a
     12 
     13 $EXEC scc ar -p file.a > $tmp1
     14 diff -u $tmp1 - <<EOF
     15 This is the first file,
     16 and it should go in the
     17 first position in the archive.
     18 But this other one is the second one,
     19 and it shouldn't go in the first position
     20 because it should go in the second position.
     21 and at the end, this is the last file
     22 that should go at the end of the file,
     23 thus it should go in the third position.
     24 EOF