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.a $tmp1' EXIT
 6trap 'exit $?' HUP INT TERM
 7
 8tmp1=tmp1.$$
 9
10############################################################################
11#list 1st member
12
13cp master.a file.a
14
15$EXEC scc ar -t file.a file1 > $tmp1
16diff -u $tmp1 - <<EOF
17file1
18EOF
19
20############################################################################
21#print 3rd member
22
23$EXEC scc ar -t file.a file3 > $tmp1
24diff -u $tmp1 - <<EOF
25file3
26EOF
27
28############################################################################
29#print 2nd member with verbose
30
31$EXEC scc ar -tv file.a file2 >$tmp1
32diff -u $tmp1 - <<EOF
33rw-r--r-- `id -u`/`id -g`	Tue Jan  1 00:00:00 1980 file2
34EOF
35
36############################################################################
37#print all members
38
39$EXEC scc ar -t file.a file1 file2 file3 >$tmp1
40diff -u $tmp1 - <<EOF
41file1
42file2
43file3
44EOF
45
46#and now with no members in command line
47
48$EXEC scc ar -t file.a > $tmp1
49diff -u $tmp1 - <<EOF
50file1
51file2
52file3
53EOF