Home
       0016-print.sh - scc - simple c99 compiler
  HTML git clone git://git.simple-cc.org/scc
   DIR Log
   DIR Files
   DIR Refs
   DIR Submodules
   DIR README
   DIR LICENSE
       ---
       0016-print.sh (606B)
       ---
            1 #!/bin/sh
            2 
            3 set -e
            4 
            5 tmp1=`mktemp`
            6 tmp2=`mktemp`
            7 
            8 trap "rm -f file.a $tmp1 $tmp2" 0 2 3 15
            9 
           10 ############################################################################
           11 #print all members
           12 
           13 cp master.a file.a
           14 scc-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