diff options
author | David Henkel-Wallace <gumby@cygnus> | 1992-07-29 16:21:34 +0000 |
---|---|---|
committer | David Henkel-Wallace <gumby@cygnus> | 1992-07-29 16:21:34 +0000 |
commit | 5898af2c4bc6a91b1430cf781eae92fef87414ce (patch) | |
tree | 1402e5339d080438a7202c67295aa35ce4007e2e /Pack-A-Progressive | |
parent | d81eea83fb445dcd573f52288c1afedf732323b1 (diff) | |
download | gdb-5898af2c4bc6a91b1430cf781eae92fef87414ce.zip gdb-5898af2c4bc6a91b1430cf781eae92fef87414ce.tar.gz gdb-5898af2c4bc6a91b1430cf781eae92fef87414ce.tar.bz2 |
Add some files from Progressive shich shouldn't be lost.
Diffstat (limited to 'Pack-A-Progressive')
-rwxr-xr-x | Pack-A-Progressive | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/Pack-A-Progressive b/Pack-A-Progressive new file mode 100755 index 0000000..5b6f66a --- /dev/null +++ b/Pack-A-Progressive @@ -0,0 +1,67 @@ +#!/bin/sh +CC=gcc + +set -x +set -e + +if [ $# != 3 ] ; then + echo Usage: $0 release host /dev/norewindtape + exit 1 +fi + +release=$1 +host=$2 +tape=$3 + +cd ${host} +mt -f ${tape} ret +mt -f ${tape} rew +/bin/tar cf ${tape} Install + +cat > /tmp/blockit.c <<'e!o!f' +#include <stdio.h> + +#define BLOCKSIZE (1024 * 62) + +main() { + long c; + long i = 0; + long j; + + setvbuf (stdout, (char *)NULL, _IOFBF, BLOCKSIZE); + + while ((c = getchar()) != EOF) { + if (ferror(stdin)) { + perror("on getchar"); + return(1); + } /* on error */ + + putchar(c); + + if (ferror(stdout)) { + perror("on putchar"); + return(1); + } /* on error */ + + ++i; + } /* while there is input */ + + for (j = (BLOCKSIZE - (i % BLOCKSIZE)); j; --j) { + putchar(0); + + if (ferror(stdout)) { + perror("on putchar"); + return(1); + } /* on error */ + } /* pad */ + + return(0); +} +e!o!f +(cd /tmp; ${CC} -o blockit blockit.c) +/bin/tar cf - ${release} | compress -vV | /tmp/blockit > ${tape} +mt -f ${tape} asf 0 +tar tvf ${tape} +dd bs=62k if=${tape} | compress -d | /bin/tar tvvf - +rm -f /tmp/blockit /tmp/blockit.c +mt -f ${tape} rew |