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
> "Ed" == Ed Ahlsen-Girard 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 Servi
Thanks to all. The below worked.
Grab the snapshots:
#!/usr/bin/perl
use Net::FTP;
unlink ;
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 ", $ftp->message;
$ft
On Sat, Jan 3, 2009 at 4:27 PM, Ed Ahlsen-Girard 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?
-
#!/bin/sh
# --
> "Ed" == Ed Ahlsen-Girard 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.
--
Ran
2009/1/3 Ed Ahlsen-Girard :
> Philip Guenther wrote:
>> On Sat, Jan 3, 2009 at 7:27 AM, Ed Ahlsen-Girard 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 sho
Karl Karlsson wrote:
2009/1/3 :
johan beisser 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
Philip Guenther wrote:
> On Sat, Jan 3, 2009 at 7:27 AM, Ed Ahlsen-Girard 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
2009/1/3 :
> johan beisser 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?
>>
johan beisser 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 starting to
On Sat, Jan 3, 2009 at 7:27 AM, Ed Ahlsen-Girard 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 from one that f
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 s
Randal L. Schwartz wrote:
>> "Daniel" == Daniel A Ramaley 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 sol
> "Daniel" == Daniel A Ramaley 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:
use File::
On Wednesday December 31 2008 13:34, you wrote:
>On Wed, Dec 31, 2008 at 9:42 AM, Christoph Leser
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 in the
>bac
> On Wed, Dec 31, 2008 at 9:42 AM, Christoph Leser
> 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 o
On Wed, Dec 31, 2008 at 9:42 AM, Christoph Leser 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 has no influen
trag 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 reason, this syntax:
>
> ftp -ia ftp://host.domain/pub/OpenBSD/sn
`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
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 discon
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
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 ftp://host.domain/pub/OpenBSD/snapshots/architecture/*.
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
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 in
24 matches
Mail list logo