#!/usr/bin/perl 
### Paketauswahl speichern

use warnings;
system("pkg_info >pkgtmp");
open(F, "<pkgtmp");
open(W, ">>autoinst.sh");
print W "#!/bin/sh\n\n";
while (<F>){
  @pkg = split /\s+/, $_;
  print W "pkg_add $pkg[0].tgz\n";
}
close(F);
unlink <pkgtmp*>;


