scc

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

0016-print.sh (605B)


      1 #!/bin/sh
      2 
      3 set -e
      4 
      5 tmp1=`mktemp`
      6 tmp2=`mktemp`
      7 
      8 trap "rm -f file.a $tmp1 $tmp2; exit" 0 2 3
      9 
     10 ############################################################################
     11 #print all members
     12 
     13 cp master.a file.a
     14 ar -p file.a file1 file2 file3 >$tmp1
     15 
     16 cat <<! > $tmp2
     17 This is the first file,
     18 and it should go in the
     19 first position in the archive.
     20 But this other one is the second one,
     21 and it shouldn't go in the first position
     22 because it should go in the second position.
     23 and at the end, this is the last file
     24 that should go at the end of the file,
     25 thus it should go in the third position.
     26 !
     27 
     28 cmp $tmp1 $tmp2