summaryrefslogtreecommitdiff
path: root/DistUpgrade
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2006-09-01 16:30:54 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2006-09-01 16:30:54 +0200
commitd97c5387211bec01e73bcb7b424049d2058f95af (patch)
treef8cabc412ccf2101cf9275622d95ae68d4710fe9 /DistUpgrade
parent3d68e37ecbeb1ef2f4af4947daf9cf1d5840c6e7 (diff)
downloadpython-apt-d97c5387211bec01e73bcb7b424049d2058f95af.tar.gz
* DistUpgrade/cdromupgrade:
- work when only a compressed version of the dist-upgrader is on the CD
Diffstat (limited to 'DistUpgrade')
-rwxr-xr-xDistUpgrade/cdromupgrade18
1 files changed, 16 insertions, 2 deletions
diff --git a/DistUpgrade/cdromupgrade b/DistUpgrade/cdromupgrade
index fcebe1c7..922963e3 100755
--- a/DistUpgrade/cdromupgrade
+++ b/DistUpgrade/cdromupgrade
@@ -11,9 +11,23 @@
# WARNING: make sure to call it with a absolute path!
# (e.g. /cdrom/cdromugprade)
+CODENAME=edgy
UPGRADER_DIR=dists/stable/dist-upgrader/binary-all/
cddirname=${0%\/*}
fullpath=$cddirname/$UPGRADER_DIR
-cd $fullpath
-gksu -- python $fullpath/edgy --cdrom $cddirname
+
+# extrace the tar to a TMPDIR and run it from there
+if [ ! -f $fullpath/$CODENAME.tar.gz ]; then
+ echo "Could not find the upgrade application archive, exiting"
+ exit 1
+fi
+
+TMPDIR=$(mktemp -d distupgrade.XXXXXX)
+cd $TMPDIR
+tar xzf $fullpath/$CODENAME.tar.gz
+if [ ! -x $TMPDIR/$CODENAME ];
+ echo "Could not find the upgrade application in the archive, exiting"
+ exit 1
+fi
+gksu -- $TMPDIR/$CODENAME --cdrom $cddirname