0035-update.sh (437B)
1 #!/bin/sh 2 3 set -e 4 5 trap 'rm -f file* $tmp1' EXIT 6 trap 'exit 1' HUP INT TERM 7 8 tmp1=tmp1.$$ 9 10 ############################################################################ 11 #Update one member that exists and using -b 12 13 echo First > file1 14 15 cp master.a file.a 16 $EXEC scc ar -rv -b file1 file.a file1 17 18 $EXEC scc ar -p file.a file1 > $tmp1 19 diff -u $tmp1 - <<EOF 20 First 21 EOF 22 23 $EXEC scc ar -t file.a > $tmp1 24 diff -u $tmp1 - <<EOF 25 file1 26 file2 27 file3 28 EOF