head	1.6;
access;
symbols
	RELENG_6_4_0_RELEASE:1.5.34.1
	RELENG_6_4:1.5.34.1.0.4
	RELENG_6_4_BP:1.5.34.1
	RELENG_6_3_0_RELEASE:1.5.34.1
	RELENG_6_3:1.5.34.1.0.2
	RELENG_6_3_BP:1.5.34.1
	RELENG_6_2_0_RELEASE:1.5
	RELENG_6_2:1.5.0.42
	RELENG_6_2_BP:1.5
	RELENG_5_5_0_RELEASE:1.5
	RELENG_5_5:1.5.0.40
	RELENG_5_5_BP:1.5
	RELENG_6_1_0_RELEASE:1.5
	RELENG_6_1:1.5.0.38
	RELENG_6_1_BP:1.5
	RELENG_6_0_0_RELEASE:1.5
	RELENG_6_0:1.5.0.36
	RELENG_6_0_BP:1.5
	RELENG_6:1.5.0.34
	RELENG_6_BP:1.5
	RELENG_5_4_0_RELEASE:1.5
	RELENG_5_4:1.5.0.32
	RELENG_5_4_BP:1.5
	RELENG_4_11_0_RELEASE:1.5
	RELENG_4_11:1.5.0.30
	RELENG_4_11_BP:1.5
	RELENG_5_3_0_RELEASE:1.5
	RELENG_5_3:1.5.0.28
	RELENG_5_3_BP:1.5
	RELENG_5:1.5.0.26
	RELENG_5_BP:1.5
	RELENG_4_10_0_RELEASE:1.5
	RELENG_4_10:1.5.0.24
	RELENG_4_10_BP:1.5
	RELENG_5_2_1_RELEASE:1.5
	RELENG_5_2_0_RELEASE:1.5
	RELENG_5_2:1.5.0.22
	RELENG_5_2_BP:1.5
	RELENG_4_9_0_RELEASE:1.5
	RELENG_4_9:1.5.0.20
	RELENG_4_9_BP:1.5
	RELENG_5_1_0_RELEASE:1.5
	RELENG_5_1:1.5.0.18
	RELENG_5_1_BP:1.5
	RELENG_4_8_0_RELEASE:1.5
	RELENG_4_8:1.5.0.16
	RELENG_4_8_BP:1.5
	RELENG_5_0_0_RELEASE:1.5
	RELENG_5_0:1.5.0.14
	RELENG_5_0_BP:1.5
	RELENG_4_7_0_RELEASE:1.5
	RELENG_4_7:1.5.0.12
	RELENG_4_7_BP:1.5
	RELENG_4_6_2_RELEASE:1.5
	RELENG_4_6_1_RELEASE:1.5
	RELENG_4_6_0_RELEASE:1.5
	RELENG_4_6:1.5.0.10
	RELENG_4_6_BP:1.5
	RELENG_4_5_0_RELEASE:1.5
	RELENG_4_5:1.5.0.8
	RELENG_4_5_BP:1.5
	RELENG_4_4_0_RELEASE:1.5
	RELENG_4_4:1.5.0.6
	RELENG_4_4_BP:1.5
	RELENG_4_3_0_RELEASE:1.5
	RELENG_4_3:1.5.0.4
	RELENG_4_3_BP:1.5
	RELENG_4_2_0_RELEASE:1.5
	RELENG_4_1_1_RELEASE:1.5
	PRE_SMPNG:1.5
	RELENG_4_1_0_RELEASE:1.5
	RELENG_3_5_0_RELEASE:1.2.12.3
	RELENG_4_0_0_RELEASE:1.5
	RELENG_4:1.5.0.2
	RELENG_4_BP:1.5
	RELENG_3_4_0_RELEASE:1.2.12.3
	RELENG_3_3_0_RELEASE:1.2.12.3
	RELENG_3_2_PAO:1.2.0.14
	RELENG_3_2_PAO_BP:1.2
	RELENG_3_2_0_RELEASE:1.2
	RELENG_3_1_0_RELEASE:1.2
	RELENG_3:1.2.0.12
	RELENG_3_BP:1.2
	RELENG_2_2_8_RELEASE:1.2
	RELENG_3_0_0_RELEASE:1.2
	RELENG_2_2_7_RELEASE:1.2
	RELENG_2_2_6_RELEASE:1.2
	RELENG_2_2_5_RELEASE:1.2
	RELENG_2_2_2_RELEASE:1.2
	RELENG_2_2_1_RELEASE:1.2
	RELENG_2_2_0_RELEASE:1.2
	RELENG_2_1_7_RELEASE:1.2
	RELENG_2_1_6_1_RELEASE:1.2
	RELENG_2_1_6_RELEASE:1.2
	RELENG_2_2:1.2.0.10
	RELENG_2_2_BP:1.2
	RELENG_2_1_5_RELEASE:1.2
	RELENG_2_1_0_RELEASE:1.2
	RELENG_2_1_0:1.2.0.8
	RELENG_2_1_0_BP:1.2
	RELENG_2_0_5_RELEASE:1.2
	RELENG_2_0_5:1.2.0.6
	RELENG_2_0_5_BP:1.2
	RELENG_2_0_5_ALPHA:1.2
	RELEASE_2_0:1.2
	BETA_2_0:1.2
	ALPHA_2_0:1.2.0.4
	MOVED_NEWCVS:1.2
	FINAL_1_1_5:1.2
	ALPHA_1_1_5:1.2
	FINAL_1_1:1.2
	GAMMA_1_1:1.2
	BETA_1_1:1.2.0.2
	BP_BETA_1_1:1.2
	FINAL_1_0:1.2
	EPSILON_1_0:1.2
	GAMMA_1_0:1.2
	BETA_1_0:1.2
	ALPHA_1_0:1.2
	GZIP_1_1:1.1.1.1
	GNU:1.1.1;
locks; strict;
comment	@# @;


1.6
date	2007.01.31.03.44.42;	author delphij;	state dead;
branches;
next	1.5;

1.5
date	99.08.27.23.35.55;	author peter;	state Exp;
branches
	1.5.2.1
	1.5.34.1;
next	1.4;

1.4
date	99.08.11.10.34.57;	author ru;	state Exp;
branches;
next	1.3;

1.3
date	99.05.28.13.23.20;	author kris;	state Exp;
branches;
next	1.2;

1.2
date	93.06.19.00.22.41;	author nate;	state Exp;
branches
	1.2.12.1;
next	1.1;

1.1
date	93.06.18.18.39.39;	author nate;	state Exp;
branches
	1.1.1.1;
next	;

1.5.2.1
date	2012.11.17.07.23.06;	author svnexp;	state Exp;
branches;
next	;

1.5.34.1
date	2007.02.20.08.33.30;	author delphij;	state dead;
branches;
next	;

1.2.12.1
date	99.06.07.14.07.31;	author kris;	state Exp;
branches;
next	1.2.12.2;

1.2.12.2
date	99.08.16.20.58.36;	author ru;	state Exp;
branches;
next	1.2.12.3;

1.2.12.3
date	99.08.29.14.33.33;	author peter;	state Exp;
branches;
next	;

1.1.1.1
date	93.06.18.18.39.40;	author nate;	state Exp;
branches;
next	;


desc
@@


1.6
log
@Remove GNU gzip left-offs, they are no longer necessary.
@
text
@#!/bin/sh
# zforce: force a gz extension on all gzip files so that gzip will not
# compress them twice.
#
# This can be useful for files with names truncated after a file transfer.
# foo is renamed to foo.gz
#
# $FreeBSD: src/gnu/usr.bin/gzip/zforce,v 1.5 1999/08/27 23:35:55 peter Exp $

x=`basename $0`
if test $# = 0; then
  echo "force a '.gz' extension on all gzip files"
  echo usage: $x files...
  exit 1
fi

res=0
for i do
  if test ! -f "$i" ; then
    echo ${x}: $i not a file
    res=1
    continue
  fi
  test `expr "$i" : '.*[.-]z$'` -eq 0 || continue
  test `expr "$i" : '.*[.-]gz$'` -eq 0 || continue
  test `expr "$i" : '.*[.]t[ag]z$'` -eq 0 || continue

  if gzip -lv < "$i" 2>/dev/null | grep '^defl' > /dev/null; then

    new="$i.gz"
    if mv "$i" "$new" 2>/dev/null; then
      echo $i -- replaced with $new
      continue
    fi
    res=1; echo ${x}: cannot rename $i to $new
  fi
done
exit $res
@


1.5
log
@$Id$ -> $FreeBSD$
@
text
@d8 1
a8 1
# $FreeBSD$
@


1.5.2.1
log
@Switch importer
@
text
@d8 1
a8 1
# $FreeBSD: stable/4/gnu/usr.bin/gzip/zforce 50472 1999-08-27 23:37:10Z peter $
@


1.5.34.1
log
@MFC: Replace gzip(1) with the BSD licensed version found in -HEAD.

Discussed with:	re, so, portmgr (kris)

All bugs are mine.
@
text
@d8 1
a8 1
# $FreeBSD: src/gnu/usr.bin/gzip/zforce,v 1.5 1999/08/27 23:35:55 peter Exp $
@


1.4
log
@Unbroke zforce.

PR:		8348
Submitted by:	Christoph Weber-Fahr <wefa@@callcenter.systemhaus.net>
@
text
@d8 1
a8 1
# $Id: zforce,v 1.3 1999/05/28 13:23:20 kris Exp $
@


1.3
log
@Fixes from OpenBSD:

Add $Id$
Removes temp file exploits in gzexe (predictable filenames)
Fixes some typos
Fixes a buffer overrun in gzip -S
Don't prepend /usr/local/bin to path in scripts
Correct location of /usr/share/misc/termcap

Obtained from:	OpenBSD
@
text
@d6 1
a6 1
# 12345678901234 is renamed to 12345678901.gz
d8 1
a8 1
# $Id$
d28 1
a28 1
  if gzip -l < "$i" 2>/dev/null | grep '^defl' > /dev/null; then
d30 1
a30 5
    if test `expr "$i" : '^............'` -eq 12; then
      new=`expr "$i" : '\(.*\)...$`.gz
    else
      new="$i.gz"
    fi
@


1.2
log
@Updated gzip from 1.1 to 1.2.2
@
text
@d7 2
a9 1
PATH="/usr/local/bin:$PATH"; export PATH
@


1.2.12.1
log
@MFC: Fixes from OpenBSD:

Add $Id$
Removes temp file exploits in gzexe (predictable filenames)
Fixes some typos
Fixes a buffer overrun in gzip -S
Don't prepend /usr/local/bin to path in scripts
Correct location of /usr/share/misc/termcap
@
text
@a6 2
#
# $Id: zforce,v 1.3 1999/05/28 13:23:20 kris Exp $
d8 1
@


1.2.12.2
log
@MFC: Unbroke zforce.

PR:		8348
@
text
@d6 1
a6 1
# foo is renamed to foo.gz
d8 1
a8 1
# $Id: zforce,v 1.2.12.1 1999/06/07 14:07:31 kris Exp $
d28 1
a28 1
  if gzip -lv < "$i" 2>/dev/null | grep '^defl' > /dev/null; then
d30 5
a34 1
    new="$i.gz"
@


1.2.12.3
log
@$Id$ -> $FreeBSD$
@
text
@d8 1
a8 1
# $FreeBSD$
@


1.1
log
@Initial revision
@
text
@d8 1
d27 1
a27 1
  gzip -t "$i" 2>/dev/null || continue
d29 10
a38 4
  if test `expr "$i" : '^............'` -eq 12; then
    new=`expr "$i" : '\(.*\)...$`.gz
  else
    new="$i.gz"
a39 5
  if mv "$i" "$new" 2>/dev/null; then
    echo $i -- replaced with $new
    continue
  fi
  res=1; echo ${x}: cannot rename $i to $new
@


1.1.1.1
log
@Gzip 1.1
@
text
@@
