This repository has been archived by the owner on Sep 23, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 82
/
install-from
executable file
·79 lines (59 loc) · 1.97 KB
/
install-from
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#!/bin/bash
FORCE_FRESH_INSTALL="yes"
START_DIR=`pwd`
NIMBUS_SRC_REL="`dirname $0`/.."
NIMBUS_SRC=`cd $NIMBUS_SRC_REL; pwd`
function usagetxt {
echo ""
echo "Usage: $0 old_dir destination_dir"
echo ""
}
# ---------------------------------------------------------------------------
if [ "X$1" = "X" ]; then
usagetxt
echo "You must specify the previous Nimbus 2.5+ directory."
exit 1
fi
if [ "X$2" = "X" ]; then
usagetxt
echo "You must specify the destination directory."
exit 1
fi
OLDNIMBUS_BASE_HOME=`cd $1; pwd`
if [ ! -e $OLDNIMBUS_BASE_HOME ]; then
echo "The old Nimbus installation must exist already: $1"
exit 1
fi
# ---------------------------------------------------------------------------
# Validate that the old Nimbus directory is usable before proceeding
NV=$OLDNIMBUS_BASE_HOME/bin/nimbus-version
if [ ! -f $NV ]; then
echo "The old Nimbus installation does not have a nimbus-version program,"
echo "looking for '$NV'"
echo ""
echo "This means it is broken or pre-2.5 and hence too old to work with $0"
exit 1
fi
# This is a proof of concept for later on, we know that this is 2.5+ already.
fullversion=`$NV --fullversion`
major=`$NV --major`
if [ $major -lt 2 ]; then
echo "Nimbus $fullversion can not be upgraded anymore, please see the docs"
echo "or inquire why on the mailing list."
exit 1
fi
minor=`$NV --minor`
if [ $minor -eq 2 ] && [ $minor -lt 5 ]; then
echo "Nimbus $fullversion can not be upgraded anymore, please see the docs"
echo "or inquire why on the mailing list."
exit 1
fi
# ---------------------------------------------------------------------------
# Launch the installation which proceeds as normal until the end when we pick
# back up with configuration tasks.
export PREVIOUS_NIMBUS_HOME_VALIDATED=$OLDNIMBUS_BASE_HOME
if [ ! -f $NIMBUS_SRC/install ]; then
echo "Cannot find the installation program? $NIMBUS_SRC/install"
exit 1
fi
exec $NIMBUS_SRC/install $2