From d97c5387211bec01e73bcb7b424049d2058f95af Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 1 Sep 2006 16:30:54 +0200 Subject: * DistUpgrade/cdromupgrade: - work when only a compressed version of the dist-upgrader is on the CD --- DistUpgrade/cdromupgrade | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'DistUpgrade') 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 -- cgit v1.2.3