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
7
# Not that useful unfortunately when the CD is mounted "noexec".
10
# the codename is AUTO-GENERATED from the build-host relase codename
12
UPGRADER_DIR=dists/$CODENAME/main/dist-upgrader/binary-all/
14
# this script can be called in three ways:
15
# sh /cdrom/cdromugprade
18
# the sh below is needed to figure out the cdromdirname
20
/*) cddirname="${0%\/*}" ;;
21
*/*) cddirname="$(pwd)/${0%\/*}" ;;
22
*) cddirname="$(pwd)/" ;;
25
fullpath="$cddirname/$UPGRADER_DIR"
27
# extract the tar to a TMPDIR and run it from there
28
if [ ! -f "$fullpath/$CODENAME.tar.gz" ]; then
29
echo "Could not find the upgrade application archive, exiting"
35
tar xzf "$fullpath/$CODENAME.tar.gz"
36
if [ ! -x $TMPDIR/$CODENAME ]; then
37
echo "Could not find the upgrade application in the archive, exiting"
40
$TMPDIR/$CODENAME --cdrom "$cddirname" $@