Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100755 80 lines (59 sloc) 2.015 kB
43149cb @timf Initial install-from support, missing cumulus import
timf authored
1 #!/bin/bash
2
3 FORCE_FRESH_INSTALL="yes"
4
5 START_DIR=`pwd`
6
eda7cdc @timf Moving install-from to the scripts directory
timf authored
7 NIMBUS_SRC_REL="`dirname $0`/.."
43149cb @timf Initial install-from support, missing cumulus import
timf authored
8 NIMBUS_SRC=`cd $NIMBUS_SRC_REL; pwd`
9
10 function usagetxt {
11 echo ""
12 echo "Usage: $0 old_dir destination_dir"
13 echo ""
14 }
15
16 # ---------------------------------------------------------------------------
17
18 if [ "X$1" = "X" ]; then
19 usagetxt
20 echo "You must specify the previous Nimbus 2.5+ directory."
21 exit 1
22 fi
23
24 if [ "X$2" = "X" ]; then
25 usagetxt
26 echo "You must specify the destination directory."
27 exit 1
28 fi
29
30 OLDNIMBUS_BASE_HOME=`cd $1; pwd`
31 if [ ! -e $OLDNIMBUS_BASE_HOME ]; then
32 echo "The old Nimbus installation must exist already: $1"
33 exit 1
34 fi
35
36 # ---------------------------------------------------------------------------
37
38 # Validate that the old Nimbus directory is usable before proceeding
39
40 NV=$OLDNIMBUS_BASE_HOME/bin/nimbus-version
41 if [ ! -f $NV ]; then
42 echo "The old Nimbus installation does not have a nimbus-version program,"
43 echo "looking for '$NV'"
44 echo ""
45 echo "This means it is broken or pre-2.5 and hence too old to work with $0"
46 exit 1
47 fi
48
49 # This is a proof of concept for later on, we know that this is 2.5+ already.
50 fullversion=`$NV --fullversion`
51
52 major=`$NV --major`
53 if [ $major -lt 2 ]; then
54 echo "Nimbus $fullversion can not be upgraded anymore, please see the docs"
55 echo "or inquire why on the mailing list."
56 exit 1
57 fi
58
59 minor=`$NV --minor`
60 if [ $minor -eq 2 ] && [ $minor -lt 5 ]; then
61 echo "Nimbus $fullversion can not be upgraded anymore, please see the docs"
62 echo "or inquire why on the mailing list."
63 exit 1
64 fi
65
66
67 # ---------------------------------------------------------------------------
68
69 # Launch the installation which proceeds as normal until the end when we pick
70 # back up with configuration tasks.
71
72 export PREVIOUS_NIMBUS_HOME_VALIDATED=$OLDNIMBUS_BASE_HOME
73
74 if [ ! -f $NIMBUS_SRC/install ]; then
75 echo "Cannot find the installation program? $NIMBUS_SRC/install"
76 exit 1
77 fi
78
79 exec $NIMBUS_SRC/install $2
Something went wrong with that request. Please try again.