1 |
I'm no coder, but I wrote a little fetchcommand for this based on suggestions |
2 |
by Sven: |
3 |
|
4 |
FETCHCOMMAND="( |
5 |
while [ -e \${DISTDIR}/`basename \${URI}`.lock ]; do |
6 |
sleep 5; done && |
7 |
if [ ! -e \${DISTDIR}/`basename \${URI}` ]; then |
8 |
wget -t 5 --passive-ftp \${URI} -O \${DISTDIR}/`basename \${URI}`.lock && |
9 |
mv \${DISTDIR}/`basename \${URI}`.lock \${DISTDIR}/`basename \${URI}`; fi |
10 |
)" |
11 |
|
12 |
suggestions, modifications are welcome. |
13 |
|
14 |
On Sunday 08 February 2004 00:59, Thomas Horsten wrote: |
15 |
> On Saturday 07 February 2004 22:07, Jeff Smelser wrote: |
16 |
> > On Saturday 07 February 2004 11:17 am, Sven Vermeulen wrote: |
17 |
> > > A quick 'n dirty hack in the FETCHCOMMAND should suffice. Something |
18 |
> > > along the lines of (pseudocode): |
19 |
> > > |
20 |
> > > FETCHCOMMAND="if exists \${DISTDIR}/`basename \${URL}.lck`; then skip; |
21 |
> > > else \ touch \${DISTDIR}/`basename \${URL}.lck`; \ |
22 |
> > > /usr/bin/wget ...; \ |
23 |
> > > rm \${DISTDIR}/`basename \${URL}.lck`; fi" |
24 |
> > |
25 |
> > I tried this, and got: |
26 |
> >[..] Errors |
27 |
> |
28 |
> Notice that Sven said it's pseudocode, just to describe the concept. It's |
29 |
> incomplete, and has an invalid syntax. For example, "if exists ..." should |
30 |
> be "if [ -e ...]" to be proper sh code. |
31 |
> |
32 |
> The real thing would be a bit more complex. |
33 |
> |
34 |
> // Thomas |
35 |
> |
36 |
> |
37 |
> -- |
38 |
> gentoo-portage-dev@g.o mailing list |
39 |
|
40 |
-- |
41 |
gentoo-portage-dev@g.o mailing list |