scc

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

0010-delete.sh (424B)


      1 #!/bin/sh
      2 
      3 
      4 set -e
      5 
      6 trap "rm -f file.a; exit" 0 2 3
      7 
      8 ############################################################################
      9 #remove all the members
     10 
     11 cp master.a file.a
     12 scc-ar -dv file.a file1 file2 file3
     13 
     14 if scc-ar -tv file.a file2 file3
     15 then
     16 	echo file-1 file2 file were not deleted >&2
     17 	exit 1
     18 fi
     19 
     20 if test `scc-ar -t file.a | wc -l` -ne 0
     21 then
     22 	echo file.a is not empty after deleting all the members >&2
     23 	exit 1
     24 fi