FYI: Howto mirror the AIX Toolbox
A one liner to get the lastest ( hopefully ) rpm packages from the aix
linux toolbox side ftp.software.ibm.com/aix/freeSoftware/aixtoolbox/
cat gettoolbox
cd PathToToolbox
wget -qO - [url]http://www.ibm.com/systems/p/os/aix/linux/toolbox/alpha.html[/url]
|\
tr "\"" "\\n" |\
grep rpm$ |\
xargs -n1 -I{} wget --mirror {}
If some one knows the option to get rid of the ftp.software.ibm.com/
aix/freeSoftware/aixtoolbox in the result path please update this
message.
cheers
Hajo
Re: FYI: Howto mirror the AIX Toolbox
Hajo Ehlers wrote:[color=blue]
> A one liner to get the lastest ( hopefully ) rpm packages from the aix
> linux toolbox side ftp.software.ibm.com/aix/freeSoftware/aixtoolbox/
>
> cat gettoolbox
> cd PathToToolbox
> wget -qO - [url]http://www.ibm.com/systems/p/os/aix/linux/toolbox/alpha.html[/url]
> |\
> tr "\"" "\\n" |\
> grep rpm$ |\
> xargs -n1 -I{} wget --mirror {}
>
>
> If some one knows the option to get rid of the ftp.software.ibm.com/
> aix/freeSoftware/aixtoolbox in the result path please update this
> message.
>
> cheers
> Hajo[/color]
Thanks Hajo,
this will strip the host name and extra dirs:
....
xargs -n1 -I{} wget --no-host-directories --cut-dirs=5 --mirror {}
I will also setup mirroring for [url]http://www.oss4aix.org/download/RPMS/[/url]
Michael Perzl's excellent compilation.
best regards
Joachim
Re: FYI: Howto mirror the AIX Toolbox
Final scripts. Fetch the latest version and generate a bundle for
further processing
Perzl RPM build
cat mirror.oss4aix.org
#!/usr/bin/ksh
if cd oss4aix.org/RPMS/ppc ; then
{
for i in aix-53.txt aix-61.txt aix-allversions.txt ; do
wget -qO - http://www.oss4aix.org/download/latest/$i
done
}| grep -v "^$" | xargs -n1 -I{} echo http://www.oss4aix.org/download/RPMS/{}[color=blue]
> ../file.list[/color]
wget --no-host-directories -nd -N -i ../file.list
# Generate Bundle file for all RPMS
cat ../file.list | cut -f7 -d"/" | xargs -n1 -I{} echo R:{} > ../../../
oss4aix.org.bnd
cd -
fi
IBM AIX Toolbox
cat mirror.aix5Ltoolbox
#!/usr/bin/ksh
if cd aix5Ltoolbox/RPMS/ppc ; then
wget -qO - [url]http://www.ibm.com/systems/p/os/aix/linux/toolbox/alpha.html[/url]
|\
tr "\"" "\\n" | grep rpm$ | sed 's/^ftp:/http:/' > ../file.list
wget --no-host-directories -nd -N -i ../file.list
cat ../file.list | cut -f10 -d"/" | xargs -n1 -I{} echo R:{}[color=blue]
> ../../../aix5Ltoolbox.bnd[/color]
cd -
fi
Use at your own risk.
Hajo