0011-delete.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
---
0011-delete.sh (425B)
---
1 #!/bin/sh
2
3
4 set -e
5
6 trap "rm -f file.a" 0 2 3 15
7
8 ############################################################################
9 #no members
10 cp master.a file.a
11
12 last=`ls -l file.a | awk '{print $6,$7,$8}'`
13
14 if ! $EXEC scc ar -dv file.a
15 then
16 echo ar returned with error when no members
17 exit 1
18 fi
19
20 now=`ls -l file.a | awk '{print $6,$7,$8}'`
21 if test "$now" != "$last"
22 then
23 echo empty ar -d modified the archive >&2
24 exit 1
25 fi