This is just a quick hack, I have been making a few test machines and got tired of cut/paste into putty to download utils and kernels.
vzfetch.sh:
#!/bin/bash
OPENVZ_KARCH="i686"
OPENVZ_UARCH="i386"
OPENVZ_SRC="/usr/local/src/openvz"
mkdir -p $OPENVZ_SRC/{kernel,util,template}
wget --quiet -O - http://openvz.org/download/kernel/ | grep http:// | egrep "(${OPENVZ_KARCH}|noarch)"\.rpm | sed "s/.*http:/http:/; s/'>.*//g;" | xargs wget -c -P ${OPENVZ_SRC}/kernel/
wget --quiet -O - http://openvz.org/download/utils/ http://openvz.org/download/template/utils/ | grep http:// | grep "(${OPENVZ_UARCH}|noarch)"\.rpm | sed "s/.*http:/http:/; s/'>.*//g;" | xargs wget -c -P ${OPENVZ_SRC}/util/
wget --quiet -O - http://openvz.org/download/template/metadata/ | grep http:// | grep "(${OPENVZ_UARCH}|noarch)"\.rpm | sed "s/.*http:/http:/; s/'>.*//g;" | xargs wget -c -P ${OPENVZ_SRC}/template/
or oneliner:
wget --quiet -O - http://openvz.org/download/kernel/ http://openvz.org/download/utils/ http://openvz.org/download/template/utils/ http://openvz.org/download/template/metadata/ | egrep "http://.*(i386|i686|noarch)\.rpm" | sed "s/.*http:/http:/; s/'>.*//g;" | xargs -t wget -r -nH -c -P /usr/local/src/openvz
[Updated on: Mon, 03 April 2006 11:01]
Report message to a moderator