Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37766671
en ru br
ALT Linux repositórios
S:1.13-alt2
5.0: 1.3.5-alt4.M40.1
4.1: 1.3.5-alt4.M40.1
4.0: 1.3.5-alt4.M40.1
3.0: 1.3.5-alt2
+updates:1.3.5-alt2.M30.1

Outros repositórios
Upstream:1.3.12

Group :: Arquivamento/Compressão
RPM: gzip

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

Patch: gzip-1.3.5-alt-znew.patch
Download


diff -upk.orig gzip-1.3.5.orig/znew.1 gzip-1.3.5/znew.1
--- gzip-1.3.5.orig/znew.1	1993-07-07 11:03:19 +0000
+++ gzip-1.3.5/znew.1	2005-05-20 17:40:36 +0000
@@ -15,7 +15,7 @@ to force a .Z extension then apply znew.
 Force recompression from .Z to .gz format even if a .gz file already exists.
 .TP
 .B \-t
-Tests the new files before deleting originals.
+Tests the new files before deleting originals (default behaviour).
 .TP
 .B \-v
 Verbose. Display the name and percentage reduction for each file compressed.
diff -upk.orig gzip-1.3.5.orig/znew.in gzip-1.3.5/znew.in
--- gzip-1.3.5.orig/znew.in	2005-05-20 15:06:31 +0000
+++ gzip-1.3.5/znew.in	2005-05-20 17:39:33 +0000
@@ -2,7 +2,7 @@
 #!/bin/sh
 
 PATH="BINDIR:$PATH"; export PATH
-check=0
+check=1
 pipe=0
 opt=
 files=
@@ -53,7 +53,7 @@ done
 if test $# -eq 0; then
   echo "recompress .Z files into $ext (gzip) files" >&2
   echo "Usage: ${0##*/} [-tv9KP] file.Z..." >&2
-  echo "  -t tests the new files before deleting originals" >&2
+  echo "  -t tests the new files before deleting originals (default)" >&2
   echo "  -v be verbose" >&2
   echo "  -9 use the slowest compression method (optimal compression)" >&2
   echo "  -K keep a .Z file when it is smaller than the $ext file" >&2
@@ -91,31 +91,24 @@ for i do
       res=1; continue
     fi
   else
-    if test $check -eq 1; then
       if cp -p "$n.Z" "$n.$$" 2> /dev/null || cp "$n.Z" "$n.$$"; then
 	:
       else
 	echo cannot backup "$n.Z"
         res=1; continue
       fi
-    fi
     if gzip -d "$n.Z"; then
       :
     else
-      test $check -eq 1 && mv "$n.$$" "$n.Z"
+      mv "$n.$$" "$n.Z"
       echo error while uncompressing $n.Z
       res=1; continue
     fi
     if gzip $opt "$n"; then
       :
     else
-      if test $check -eq 1; then
 	mv "$n.$$" "$n.Z" && rm -f "$n"
         echo error while recompressing $n
-      else
-	# compress $n  (might be dangerous if disk full)
-        echo error while recompressing $n, left uncompressed
-      fi
       res=1; continue
     fi
   fi
@@ -124,14 +117,13 @@ for i do
 			      `expr \( $new + $block - 1 \) / $block`; then
     if test $pipe -eq 1; then
       rm -f "$n$ext"
-    elif test $check -eq 1; then
-      mv "$n.$$" "$n.Z" && rm -f "$n$ext"
     else
-      gzip -d "$n$ext" && compress "$n" && rm -f "$n$ext"
+      mv "$n.$$" "$n.Z" && rm -f "$n$ext"
     fi
     echo "$n.Z smaller than $n$ext -- unchanged"
-
-  elif test $check -eq 1; then
+  elif test $pipe -eq 1; then
+    rm -f "$n.Z"
+  else
     if gzip -t "$n$ext" ; then
       rm -f "$n.$$" "$n.Z"
     else
@@ -140,8 +132,6 @@ for i do
       echo error while testing $n$ext, $n.Z unchanged
       res=1; continue
     fi
-  elif test $pipe -eq 1; then
-    rm -f "$n.Z"
   fi
 done
 exit $res
 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009