scc

A fork of https://git.simple-cc.org/scc/ for Qute

git clone https://git.8pit.net/scc.git

 1#!/bin/sh
 2
 3set -e
 4
 5trap 'rm -f file* $tmp1' EXIT
 6trap 'exit $?' HUP INT TERM
 7
 8tmp1=tmp1.$$
 9
10############################################################################
11#extract all members
12
13cp master.a file.a
14
15$EXEC scc ar -xv file.a file1 file2 file3
16cat file1 file2 file3 > $tmp1
17
18diff -u $tmp1 - <<EOF
19This is the first file,
20and it should go in the
21first position in the archive.
22But this other one is the second one,
23and it shouldn't go in the first position
24because it should go in the second position.
25and at the end, this is the last file
26that should go at the end of the file,
27thus it should go in the third position.
28EOF
29
30if test `ls file? | wc -l` -ne 3
31then
32	echo some error extracting files
33	exit 1
34fi