~straemer/ubuntu/quantal/update-manager/fix-for-1058070

« back to all changes in this revision

Viewing changes to tests/test-data-cdrom/cdromupgrade

  • Committer: Package Import Robot
  • Author(s): Michael Terry
  • Date: 2012-06-29 10:59:30 UTC
  • mfrom: (389.1.2 precise-security)
  • Revision ID: package-import@ubuntu.com-20120629105930-0oaj9vdvykmvkjum
Tags: 1:0.165
* Implementation of "update on start" feature from spec
  https://wiki.ubuntu.com/SoftwareUpdates
* Use a single main window that changes instead of having modal dialogs
* Implement several special-purpose dialogs like "No updates" or
  "Dist upgrade needed" accordingn to the above spec
* Split out release upgrader code and DistUpgrade module into a separate
  source package
* Drop python-update-manager, as it is unused
* debian/tests:
  - Add dep8 tests

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/sh
2
 
#
3
 
# "cdromupgrade" is a shell script wrapper around the dist-upgrader
4
 
# to make it possible to put it onto the top-level dir of a CD and
5
 
# run it from there
6
 
7
 
# Not that useful unfortunately when the CD is mounted "noexec".
8
 
#
9
 
# WARNING: make sure to call it with a absolute path!
10
 
#          (e.g. /cdrom/cdromupgrade)
11
 
 
12
 
# the codename is AUTO-GENERATED from the build-host relase codename
13
 
CODENAME=intrepid
14
 
UPGRADER_DIR=dists/stable/main/dist-upgrader/binary-all/
15
 
 
16
 
cddirname="${0%\/*}"
17
 
fullpath="$cddirname/$UPGRADER_DIR"
18
 
 
19
 
# extrace the tar to a TMPDIR and run it from there
20
 
if [ ! -f "$fullpath/$CODENAME.tar.gz" ]; then
21
 
    echo "Could not find the upgrade application archive, exiting"
22
 
    exit 1
23
 
fi
24
 
 
25
 
TMPDIR=$(mktemp -d)
26
 
cd $TMPDIR
27
 
tar xzf "$fullpath/$CODENAME.tar.gz"
28
 
if [ ! -x $TMPDIR/$CODENAME ]; then
29
 
    echo "Could not find the upgrade application in the archive, exiting"
30
 
    exit 1
31
 
fi
32
 
$TMPDIR/$CODENAME --cdrom "$cddirname" $@