0017-print.sh - scc - simple c99 compiler
(HTM) git clone git://git.simple-cc.org/scc
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) Submodules
(DIR) README
(DIR) LICENSE
---
0017-print.sh (540B)
---
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 #and now with no members in command line
11
12 cp master.a file.a
13 $EXEC scc ar -p file.a > $tmp1
14
15 cat <<! > $tmp2
16 This is the first file,
17 and it should go in the
18 first position in the archive.
19 But this other one is the second one,
20 and it shouldn't go in the first position
21 because it should go in the second position.
22 and at the end, this is the last file
23 that should go at the end of the file,
24 thus it should go in the third position.
25 !
26
27 cmp $tmp1 $tmp2