diff options
author | Joey Hess <joey@kodama.kitenet.net> | 2008-04-01 18:31:15 -0400 |
---|---|---|
committer | Joey Hess <joey@kodama.kitenet.net> | 2008-04-01 18:31:15 -0400 |
commit | b2fcc49059c2133a2f989a6fc163d3c11c188fd1 (patch) | |
tree | 2e2a75f84a55a952d1950a3d2f4b05f1c2fd536b /dh_installman | |
parent | 9b7f74380bd2d9aaca614b9dd7b509d905c0d73f (diff) | |
download | debhelper-b2fcc49059c2133a2f989a6fc163d3c11c188fd1.tar.gz |
dh_installman: man --recode transparently uncompresses compressed pages. So when saving the output back, save it to a non-compressed filename (and delete the original, compressed file). Closes: #4709136.0.11
Diffstat (limited to 'dh_installman')
-rwxr-xr-x | dh_installman | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/dh_installman b/dh_installman index dbe25dd2..f0ff2245 100755 --- a/dh_installman +++ b/dh_installman @@ -197,9 +197,12 @@ foreach my $package (@{$dh{DOPACKAGES}}) { if (-e "$tmp/$dir") { find(sub { return if ! -f $_ || -l $_; - complex_doit "man --recode UTF-8 ./\Q$_\E > \Q$_.new\E"; - doit "chmod",644,"$_.new"; - doit "mv","-f","$_.new",$_; + my ($tmp, $orig)=($_.".new", $_); + complex_doit "man --recode UTF-8 ./\Q$orig\E > \Q$tmp\E"; + # recode uncompresses compressed pages + doit "rm", "-f", $orig if s/\.(gz|Z)$//; + doit "chmod", 644, $tmp; + doit "mv", "-f", $tmp, $_; }, "$tmp/$dir"); } } |