summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2014-07-28 02:41:01 +0200
committerJonas Smedegaard <dr@jones.dk>2014-07-30 09:17:19 +0200
commit80f4de62bddc6fa11d812567d987dde8d846b462 (patch)
tree07f0841d440f4518f24d557c20edd278d6068764 /bin
parent0e7d57692e4a33e8f64bbef1cc9e151c351aa837 (diff)
Fix avoid trailing space in generated package lists.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/pkglist2preseed6
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,;