diff options
author | Jonas Smedegaard <dr@jones.dk> | 2014-07-28 02:41:01 +0200 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2014-07-30 09:17:19 +0200 |
commit | 80f4de62bddc6fa11d812567d987dde8d846b462 (patch) | |
tree | 07f0841d440f4518f24d557c20edd278d6068764 /bin/pkglist2preseed | |
parent | 0e7d57692e4a33e8f64bbef1cc9e151c351aa837 (diff) |
Fix avoid trailing space in generated package lists.
Diffstat (limited to 'bin/pkglist2preseed')
-rwxr-xr-x | bin/pkglist2preseed | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/bin/pkglist2preseed b/bin/pkglist2preseed index c93debe..0162726 100755 --- a/bin/pkglist2preseed +++ b/bin/pkglist2preseed @@ -15,13 +15,13 @@ my $outdir = $outfile->parent; my $altinfile = path( $infile->parent, 'script.sh.in' ); my $altoutfile = path( $outdir, 'script.sh' ); -my ($pkgdesc, $pkglist); +my ($pkgdesc, @pkg); foreach (@pkgfiles) { foreach (path($_)->lines) { chomp; /^[#]{2} (.*)/ and $pkgdesc .= "# $1\n"; /^[#]{1} (.*)/ and $pkgdesc .= "# * $1\n"; - /^[^#]+/ and $pkglist .= "$_ "; + /^[^#]+/ and push @pkg, $_; }; }; chomp $pkgdesc; @@ -37,6 +37,8 @@ foreach (@tweakfiles) { }; chomp $tweakdesc; +my $pkglist = join( ' ', @pkg ); + $outdir->mkpath; $_ = $altinfile->slurp; s,__PKGDESC__,$pkgdesc,; |