Re: bootstrap.pl for setting up my machine

2011-10-31 Thread Sime Ramov
Here's the finished script from which I just bootstrapped -current. Gets the job done. Thanks for the help. #!/usr/bin/perl # Usage: ftp -o - -V http://dl.ramov.com/bootstrap.pl | perl - use 5.010; use strict; use warnings; die "This script must be run as root.\n" unless $> eq 0; my $arch = q

Re: bootstrap.pl for setting up my machine

2011-10-29 Thread Sime Ramov
* Shlomi Fish [2011-10-29T19:03+0200]: > Since you're not interested in the output of the pkg_add command, you should > do: > > system("pkg_add", $_); Actually, I am. I want to be able to interface with the program. E.g. if there are multiple flavors for some package, `pkg_add` might prompt me w

bootstrap.pl for setting up my machine

2011-10-29 Thread Sime Ramov
Nothing to get excited about as this is just a beginning of my first Perl script. Intention is to pipe it from some web accessible location to perl upon first boot. I have difficulties with 'perlism' as I tend to only write small trivial shell scripts. More specifically, the following line: