|
@@ -6,11 +6,13 @@ usage() {
|
6
|
6
|
exit 1
|
7
|
7
|
}
|
8
|
8
|
|
9
|
|
-cp_loader() {
|
10
|
|
- loader="${install_tpl}/loader.py"
|
11
|
|
- cp -Rv $loader $instdir/
|
|
9
|
+loader_update() {
|
|
10
|
+ libdir=$1
|
|
11
|
+ install_tpl=$2
|
|
12
|
+ instdir=$3
|
|
13
|
+ cp -Rv $install_tpl/loader.py $instdir/loader.py
|
12
|
14
|
# Adding lib path to loader
|
13
|
|
- sed -i -E "s#^(LODEL2_LIB_ABS_PATH = )None#\1'$libdir'#" "$loader"
|
|
15
|
+ sed -i -E "s#^(LODEL2_LIB_ABS_PATH = )None#\1'$libdir'#" "$instdir/loader.py"
|
14
|
16
|
}
|
15
|
17
|
|
16
|
18
|
|
|
@@ -51,6 +53,7 @@ libdir=$(realpath $libdir)
|
51
|
53
|
install_tpl=$(realpath $install_tpl)
|
52
|
54
|
em_file=$(realpath $em_file)
|
53
|
55
|
|
|
56
|
+echo "LIBDIR : $libdir"
|
54
|
57
|
|
55
|
58
|
if test ! -d $install_tpl
|
56
|
59
|
then
|
|
@@ -63,9 +66,9 @@ conf="$instdir/conf.d/lodel2.ini"
|
63
|
66
|
|
64
|
67
|
if [ $1 = '-u' ]
|
65
|
68
|
then
|
66
|
|
- #Update instance
|
67
|
|
- cp_loader
|
68
|
|
- exit 0
|
|
69
|
+ #Update instance
|
|
70
|
+ loader_update "$libdir" "$install_tpl" "$instdir"
|
|
71
|
+ exit 0
|
69
|
72
|
fi
|
70
|
73
|
|
71
|
74
|
if [ -e "$instdir" ]
|
|
@@ -84,12 +87,9 @@ cp -Rv $install_tpl/conf.d $instdir/
|
84
|
87
|
cp -Rv $em_file $instdir/editorial_model.pickle
|
85
|
88
|
ln -sv $install_tpl/Makefile $instdir/Makefile
|
86
|
89
|
ln -sv $install_tpl/lodel_admin.py $instdir/lodel_admin.py
|
87
|
|
-ln -sv $libdir/plugins $instdir/plugins
|
88
|
|
-cp_loader
|
|
90
|
+ln -sv $libdir/lodel/plugins $instdir/plugins
|
|
91
|
+loader_update "$libdir" "$install_tpl" "$instdir"
|
89
|
92
|
|
90
|
|
-echo "BEGIN LS"
|
91
|
|
-ls -la $instdir
|
92
|
|
-echo "END LS"
|
93
|
93
|
# Adding instance name to conf
|
94
|
94
|
sed -i -E "s#^sitename = noname#sitename = $name#" "$conf"
|
95
|
95
|
|