Thanks to all. The below worked.
Grab the snapshots:
#!/usr/bin/perl
use Net::FTP;
unlink /home/ed/snap/*;
my $host = 'rt.fm';
my $ftp = Net::FTP-new($host, Debug =0)
or die Cannot connect to $host: $0;
$ftp-login(anonymous,'-anonymous@')
or die Cannot login ,
Ed == Ed Ahlsen-Girard eagir...@cox.net writes:
Ed #!/bin/sh
Ed export cvsroot=anon...@rt.fm:/cvs
Ed cd /usr
Ed cvs checkout -P src
Ed date
You still haven't learned to check the return value of cd. :)
That should be:
cd /usr || exit 1
--
Randal L. Schwartz - Stonehenge Consulting
On Sun, Jan 04, 2009 at 07:03:38AM -0600, Ed Ahlsen-Girard wrote:
Thanks to all. The below worked.
Grab the snapshots:
[...]
Update source:
#!/bin/sh
export cvsroot=anon...@rt.fm:/cvs
cd /usr
cvs checkout -P src
Why not use cvs update? Of course you need to chdir to /usr/src
Randal L. Schwartz wrote:
Daniel == Daniel A Ramaley daniel.rama...@drake.edu writes:
Daniel chdir /path-to-dir;
You didn't check the success of the chdir. This will ruin your original
current directory if that fails...
Daniel unlink *;
Oops!
The proper solution
On Jan 3, 2009, at 7:27 AM, Ed Ahlsen-Girard wrote:
You're right. You're so right, in fact, that I'd already changed the
code; even I noticed that my original was bad practice.
You're doing this in perl, and not using Net::FTP?
But my real problem was getting the download to work inside a
On Sat, Jan 3, 2009 at 7:27 AM, Ed Ahlsen-Girard eagir...@cox.net wrote:
...
But my real problem was getting the download to work inside a script,
and none of the presented ideas so far have helped that.
Perhaps you should actually show the complete output from one that
succeeds and then again
johan beisser j...@caustic.org wrote:
On Jan 3, 2009, at 7:27 AM, Ed Ahlsen-Girard wrote:
You're right. You're so right, in fact, that I'd already changed the
code; even I noticed that my original was bad practice.
You're doing this in perl, and not using Net::FTP?
I'm
2009/1/3 eagir...@cox.net:
johan beisser j...@caustic.org wrote:
On Jan 3, 2009, at 7:27 AM, Ed Ahlsen-Girard wrote:
You're right. You're so right, in fact, that I'd already changed the
code; even I noticed that my original was bad practice.
You're doing this in perl, and not
Philip Guenther wrote:
On Sat, Jan 3, 2009 at 7:27 AM, Ed Ahlsen-Girard eagir...@cox.net wrote:
...
But my real problem was getting the download to work inside a script,
and none of the presented ideas so far have helped that.
Perhaps you should actually show the complete output
Karl Karlsson wrote:
2009/1/3 eagir...@cox.net:
johan beisser j...@caustic.org wrote:
On Jan 3, 2009, at 7:27 AM, Ed Ahlsen-Girard wrote:
You're right. You're so right, in fact, that I'd already changed the
code; even I noticed that my original was bad practice.
2009/1/3 Ed Ahlsen-Girard eagir...@cox.net:
Philip Guenther wrote:
On Sat, Jan 3, 2009 at 7:27 AM, Ed Ahlsen-Girard eagir...@cox.net wrote:
...
But my real problem was getting the download to work inside a script,
and none of the presented ideas so far have helped that.
Perhaps you should
Ed == Ed Ahlsen-Girard eagir...@cox.net writes:
Ed #!/usr/bin/perl
Ed `cd /home/ed/snap`;
This doesn't do anything, except waste time.
May I suggest a good book or two for learning perl, so you won't keep
wasting time on this? :)
Might be a good way to learn to check return values as well.
On Sat, Jan 3, 2009 at 4:27 PM, Ed Ahlsen-Girard eagir...@cox.net wrote:
But my real problem was getting the download to work inside a script,
and none of the presented ideas so far have helped that.
A simple shell alternative maybe?
-
Daniel == Daniel A Ramaley daniel.rama...@drake.edu writes:
Daniel chdir /path-to-dir;
You didn't check the success of the chdir. This will ruin your original
current directory if that fails...
Daniel unlink *;
Oops!
The proper solution is rmtree, a function defined in File::Path:
I'm trying to automate getting the sets and source for running -current.
For some reason, this syntax:
ftp -ia ftp://host.domain/pub/OpenBSD/snapshots/architecture/*.tgz
or this:
ftp -ia ftp://host.domain/pub/OpenBSD/snapshots/architecture/bsd.rd
works great from the command line. But not
Ed Ahlsen-Girard wrote:
Anybody have an idea of what I'm missing?
How is $PATH set? Do the scripts work if you include the full path?
i.e. /usr/bin/ftp
Regards,
-Lars
this works for me, recheck your install, or otherwise
try to compile ftp again from sources.
-Jesus
Ed Ahlsen-Girard escribis:
I'm trying to automate getting the sets and source for running -current.
For some reason, this syntax:
ftp -ia
Ed Ahlsen-Girard wrote:
I'm trying to automate getting the sets and source for running
-current.
Incase you don't want to reinvent the wheel:
http://www.xs4all.nl/~hanb/software/OpenBSD-binary-upgrade/
# Han
Ed Ahlsen-Girard wrote:
`ftp -ia ftp://host.domain/pub/OpenBSD/snapshots/architecture/*.tgz`;
Using system () does not get any different behavior, whether I pass a
list or a proper array. In all cases I see a connection to the server,
followed by a complaint of an invalid directory, and
`cd /path-to-dir;rm *`;
Regards
Christoph
Von: owner-m...@openbsd.org im Auftrag von Ed Ahlsen-Girard
Gesendet: Mi 31.12.2008 13:27
An: misc@openbsd.org
Betreff: ftp from script
I'm trying to automate getting the sets and source for running -current.
For some
Betreff: ftp from script
I'm trying to automate getting the sets and source for running -current.
For some reason, this syntax:
ftp -ia ftp://host.domain/pub/OpenBSD/snapshots/architecture/*.tgz
or this:
ftp -ia ftp://host.domain/pub/OpenBSD/snapshots/architecture/bsd.rd
works
On Wed, Dec 31, 2008 at 9:42 AM, Christoph Leser le...@sup-logistik.de wrote:
Just my 1 cent on the perl script
#!/usr/bin/perl
`cd /path-to-dir`:
`rm *`;
will purge your working directory, not /path-to-dir, as each of the `command`
constructs is executed in a process of its own and thus
On Wed, Dec 31, 2008 at 9:42 AM, Christoph Leser le...@sup-logistik.de
wrote:
Just my 1 cent on the perl script
#!/usr/bin/perl
`cd /path-to-dir`:
`rm *`;
will purge your working directory, not /path-to-dir, as each of the
`command`
constructs is executed in a process of its
On Wednesday December 31 2008 13:34, you wrote:
On Wed, Dec 31, 2008 at 9:42 AM, Christoph Leser
le...@sup-logistik.de wrote:
#!/usr/bin/perl
`cd /path-to-dir`:
`rm *`;
You shouldn't be using backticks in a perl script. Backtick simply
starts a new process/subshell and runs whatever you have
24 matches
Mail list logo