summaryrefslogtreecommitdiff
path: root/DistUpgrade/cdromupgrade
diff options
context:
space:
mode:
authorglatzor@ubuntu.com <>2006-09-09 23:07:01 +0200
committerglatzor@ubuntu.com <>2006-09-09 23:07:01 +0200
commit55dc951dc39a68249435256da79bacfd2961e1c4 (patch)
tree4eaf74f7e56334a1a8c787b2ac5d8ee1f675c3bd /DistUpgrade/cdromupgrade
parent3afcdfc4f30173672b5745f69e2bc401f20e1d90 (diff)
parenta5a1685317f25de0a0d7bd8ccc5317a17fa219bf (diff)
downloadpython-apt-55dc951dc39a68249435256da79bacfd2961e1c4.tar.gz
* merge with mvo
Diffstat (limited to 'DistUpgrade/cdromupgrade')
-rwxr-xr-xDistUpgrade/cdromupgrade33
1 files changed, 33 insertions, 0 deletions
diff --git a/DistUpgrade/cdromupgrade b/DistUpgrade/cdromupgrade
new file mode 100755
index 00000000..9ed8cdea
--- /dev/null
+++ b/DistUpgrade/cdromupgrade
@@ -0,0 +1,33 @@
+#!/bin/sh
+#
+# "cdromupgrade" is a shell script wrapper around the dist-upgrader
+# to make it possible to put it onto the top-level dir of a CD and
+# run it from there
+#
+# Not that useful unfortunately when the CD is mounted "noexec",
+# but useful for the notification-daemon that will just run it
+# and be done with it
+#
+# WARNING: make sure to call it with a absolute path!
+# (e.g. /cdrom/cdromugprade)
+
+CODENAME=edgy
+UPGRADER_DIR=dists/stable/main/dist-upgrader/binary-all/
+
+cddirname=${0%\/*}
+fullpath=$cddirname/$UPGRADER_DIR
+
+# 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