chiark
/
gitweb
/
~cjwatson
/
bin.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ubuntu-daily: default to oneiric
[bin.git]
/
ubuntu-daily
diff --git
a/ubuntu-daily
b/ubuntu-daily
index d1143228264790d474bf73a7a1b9779620ef5572..9322569ab335c8178efcea560ec5faa7c9390037 100755
(executable)
--- a/
ubuntu-daily
+++ b/
ubuntu-daily
@@
-1,10
+1,11
@@
#! /bin/sh
PROJECT=
#! /bin/sh
PROJECT=
-CURRENT_DIST=
maverick
+CURRENT_DIST=
oneiric
DIST="$CURRENT_DIST"
DIST="$CURRENT_DIST"
-BASE=
antimony:cdimage/www/full
+BASE=
cdimage.ubuntu.com::cdimage
RSYNC=false
RSYNC=false
+HTTP=false
usage () {
cat <<EOF
usage () {
cat <<EOF
@@
-12,13
+13,14
@@
Usage: $0 [options] image_type architecture
Options:
-f|--flavour FLAVOUR Flavour (default: ubuntu).
Options:
-f|--flavour FLAVOUR Flavour (default: ubuntu).
- -d|--dist DIST Distribution (default:
maverick
).
- -a|--a
nonymous Don't u
se privileged access.
+ -d|--dist DIST Distribution (default:
oneiric
).
+ -a|--a
uthenticated U
se privileged access.
-r|--rsync Force rsync.
-r|--rsync Force rsync.
+ -h|--http Force HTTP only (no reuse).
EOF
}
EOF
}
-eval set -- "$(getopt -o f:d:ar
-l help,flavour:,dist:,anonymous,rsync
-- "$@")" || { usage >&2; exit 2; }
+eval set -- "$(getopt -o f:d:ar
h -l help,flavour:,dist:,authenticated,rsync,http
-- "$@")" || { usage >&2; exit 2; }
while :; do
case $1 in
--help)
while :; do
case $1 in
--help)
@@
-36,27
+38,28
@@
while :; do
DIST="$2"
shift 2
;;
DIST="$2"
shift 2
;;
- -a|--a
nonymous
)
- BASE=
cdimage.ubuntu.com::cdimage
+ -a|--a
uthenticated
)
+ BASE=
antimony:cdimage/www/full
shift
;;
-r|--rsync)
RSYNC=:
shift
;;
shift
;;
-r|--rsync)
RSYNC=:
shift
;;
+ -h|--http)
+ HTTP=:
+ shift
+ ;;
--) shift; break ;;
*) usage >&2; exit 2;
esac
done
--) shift; break ;;
*) usage >&2; exit 2;
esac
done
-case $2 in
- hppa*|ia64*|lpia*|powerpc*|sparc*)
- PREFIX=ports/
- ;;
- *)
- PREFIX=
- ;;
-esac
+if $HTTP; then
+ BASE="http://cdimage.ubuntu.com"
+fi
+
+PREFIX=
if [ "$DIST" != "$CURRENT_DIST" ]; then
PREFIX="$DIST/$PREFIX"
fi
if [ "$DIST" != "$CURRENT_DIST" ]; then
PREFIX="$DIST/$PREFIX"
fi
@@
-94,7
+97,7
@@
esac
case $1 in
install|alternate|server|addon|serveraddon|dvd) ;;
*)
case $1 in
install|alternate|server|addon|serveraddon|dvd) ;;
*)
- RSYNC=:
+
$HTTP ||
RSYNC=:
;;
esac
;;
esac
@@
-103,6
+106,8
@@
REMOTE="$BASE/${PROJECT:+$PROJECT/}$IMAGE_TYPE/current/$DIST-$1-$2"
if $RSYNC; then
ionice -c2 -n7 rsync -avP "$REMOTE.$EXTENSION" "$LOCAL.$EXTENSION"
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
else
rsync -avP "$REMOTE.jigdo" "$LOCAL.jigdo"
if [ "$PROJECT" ]; then