Hi Hrvoje :))

    I've downloaded and installed wget 1.9 without problems, but when
I install something seamlessly, I insist on messing around until I
break something...

    The matter is that if you delete 'wget.info' to force recreation,
and your makeinfo is more or less recent, you *don't* have
wget.info-[0-9] files, since new texinfo's have the default --split-size
limit raised from 50k to 300k. So, when poor little bash run the
following:

    for file in wget.info wget.info-*[0-9]
    do
        install -c -m 644 $file /destination/dir/$file
    done

    the first iteration 'file' contains 'wget.info', but the second
one it contains 'wget.info-*[0-9]', a valid shell pattern that leads
to the following:

    install -c -m 644 /destination/dir/wget.info-1 \
        /destination/dir/wget.info-2 \
        /destination/dir/wget.info-3 \
        /destination/dir/wget.info-4

    I've split the lines for readability... The problem is that
'install' barfs saying that you're installing multiple files and the
last one is not a directory.

    If you add double quotes around '$$file' in that part, the error
just changes, from 'multiple-files-last-not-dir' to 'cannot stat that
file'. The problem is in the globbing... I've solved this in the past
using '$(wildcard)' for the globbing and not using wildcards in the
'for' loops, but it's a bit complex, I must confess. You can do with
this easier solution:

    for file in wget.info*
    ...

    Since you're sure that at least wget.info exists, the globbing
won't expand to an empty string (which will make bash barf), so
you're safe and you don't depend on wget.info-whatever existing or
not, and you don't run the risk of a glob pattern going unexpanded in
the 'install' command line.

    I'm not sure if this is a good solution at all, as I've said
above this is not the solution I've done in the past, so I don't
provide a patch. It's not urgent, and I want to hear alternatives
prior to preparing a patch.

    And thanks again to Hrvoje and all other people who has
collaborated with wget: good work :))

    Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736
http://www.pleyades.net & http://raul.pleyades.net/

Reply via email to