summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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