DIST="$CURRENT_DIST"
BASE=antimony:cdimage/www/full
RSYNC=false
+HTTP=false
usage () {
cat <<EOF
-d|--dist DIST Distribution (default: maverick).
-a|--anonymous Don't use privileged access.
-r|--rsync Force rsync.
+ -h|--http Force HTTP only (no reuse).
EOF
}
-eval set -- "$(getopt -o f:d:ar -l help,flavour:,dist:,anonymous,rsync -- "$@")" || { usage >&2; exit 2; }
+eval set -- "$(getopt -o f:d:arh -l help,flavour:,dist:,anonymous,rsync,http -- "$@")" || { usage >&2; exit 2; }
while :; do
case $1 in
--help)
RSYNC=:
shift
;;
+ -h|--http)
+ HTTP=:
+ shift
+ ;;
--) shift; break ;;
*) usage >&2; exit 2;
esac
done
+if $HTTP; then
+ BASE="http://cdimage.ubuntu.com"
+fi
+
case $2 in
hppa*|ia64*|lpia*|powerpc*|sparc*)
PREFIX=ports/
case $1 in
install|alternate|server|addon|serveraddon|dvd) ;;
*)
- RSYNC=:
+ $HTTP || RSYNC=:
;;
esac
if $RSYNC; then
ionice -c2 -n7 rsync -avP "$REMOTE.$EXTENSION" "$LOCAL.$EXTENSION"
+elif $HTTP; then
+ wget -O "$LOCAL.$EXTENSION" "$REMOTE.$EXTENSION"
else
rsync -avP "$REMOTE.jigdo" "$LOCAL.jigdo"
if [ "$PROJECT" ]; then