0001-append.sh (488B)
1 #!/bin/sh 2 3 set -e 4 5 trap 'rm -f file* $tmp1' EXIT 6 trap 'exit $?' HUP INT TERM 7 8 tmp1=tmp1.$$ 9 10 ########################################################################### 11 #Append generated files at once to an empty archive 12 13 echo First > file1 14 echo Second > file2 15 echo Third > file3 16 17 rm -f file.a 18 $EXEC scc ar -qv file.a file1 file2 file3 19 20 $EXEC scc ar -t file.a > $tmp1 21 diff -u $tmp1 - <<EOF 22 file1 23 file2 24 file3 25 EOF 26 27 $EXEC scc ar -p file.a > $tmp1 28 diff -u $tmp1 - <<EOF 29 First 30 Second 31 Third 32 EOF