0035-update.sh (463B)
1 #!/bin/sh 2 3 set -e 4 5 tmp1=`mktemp` 6 tmp2=`mktemp` 7 8 trap "rm -f file* $tmp1 $tmp2" 0 2 3 15 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 20 cat <<EOF > $tmp2 21 First 22 EOF 23 24 cmp $tmp1 $tmp2 25 26 $EXEC scc ar -t file.a > $tmp1 27 28 cat <<EOF > $tmp2 29 file1 30 file2 31 file3 32 EOF 33 34 cmp $tmp1 $tmp2