mirror of
https://github.com/yweber/lodel2.git
synced 2026-01-24 15:00:12 +01:00
Bugfixes in create_instance and in all runtest process
This commit is contained in:
parent
a21e0be25f
commit
8c5a442e7c
4 changed files with 18 additions and 16 deletions
|
|
@ -1,5 +1,5 @@
|
|||
SUBDIRS = lodel progs lodelsites
|
||||
EXTRA_DIST = runtest examples tests runtest.sh debian
|
||||
EXTRA_DIST = runtest examples tests debian
|
||||
CLEANFILES = runtest
|
||||
|
||||
lodel2_localstate_DATA =
|
||||
|
|
|
|||
|
|
@ -6,11 +6,13 @@ usage() {
|
|||
exit 1
|
||||
}
|
||||
|
||||
cp_loader() {
|
||||
loader="${install_tpl}/loader.py"
|
||||
cp -Rv $loader $instdir/
|
||||
loader_update() {
|
||||
libdir=$1
|
||||
install_tpl=$2
|
||||
instdir=$3
|
||||
cp -Rv $install_tpl/loader.py $instdir/loader.py
|
||||
# Adding lib path to loader
|
||||
sed -i -E "s#^(LODEL2_LIB_ABS_PATH = )None#\1'$libdir'#" "$loader"
|
||||
sed -i -E "s#^(LODEL2_LIB_ABS_PATH = )None#\1'$libdir'#" "$instdir/loader.py"
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -51,6 +53,7 @@ libdir=$(realpath $libdir)
|
|||
install_tpl=$(realpath $install_tpl)
|
||||
em_file=$(realpath $em_file)
|
||||
|
||||
echo "LIBDIR : $libdir"
|
||||
|
||||
if test ! -d $install_tpl
|
||||
then
|
||||
|
|
@ -63,9 +66,9 @@ conf="$instdir/conf.d/lodel2.ini"
|
|||
|
||||
if [ $1 = '-u' ]
|
||||
then
|
||||
#Update instance
|
||||
cp_loader
|
||||
exit 0
|
||||
#Update instance
|
||||
loader_update "$libdir" "$install_tpl" "$instdir"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ -e "$instdir" ]
|
||||
|
|
@ -84,12 +87,9 @@ cp -Rv $install_tpl/conf.d $instdir/
|
|||
cp -Rv $em_file $instdir/editorial_model.pickle
|
||||
ln -sv $install_tpl/Makefile $instdir/Makefile
|
||||
ln -sv $install_tpl/lodel_admin.py $instdir/lodel_admin.py
|
||||
ln -sv $libdir/plugins $instdir/plugins
|
||||
cp_loader
|
||||
ln -sv $libdir/lodel/plugins $instdir/plugins
|
||||
loader_update "$libdir" "$install_tpl" "$instdir"
|
||||
|
||||
echo "BEGIN LS"
|
||||
ls -la $instdir
|
||||
echo "END LS"
|
||||
# Adding instance name to conf
|
||||
sed -i -E "s#^sitename = noname#sitename = $name#" "$conf"
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import sys, os, os.path
|
|||
#
|
||||
# Bootstraping
|
||||
#
|
||||
LODEL2_LIB_ABS_PATH = '/home/yannweb/dev/lodel2/lodel2-git'
|
||||
LODEL2_LIB_ABS_PATH = None
|
||||
if LODEL2_LIB_ABS_PATH is not None:
|
||||
if not os.path.isdir(LODEL2_LIB_ABS_PATH):
|
||||
print("FATAL ERROR : the LODEL2_LIB_ABS_PATH variable in loader.py is \
|
||||
|
|
|
|||
|
|
@ -59,8 +59,10 @@ if [ ! -d "$install_model_dir" ]
|
|||
then
|
||||
install_model_dir="$(dirname $0)/progs/slim/install_model/"
|
||||
fi
|
||||
libdir=$(realpath "$(dirname $0)")
|
||||
rmdir $testdir
|
||||
./progs/create_instance test_instance $testdir "$install_model_dir" ./examples/em_test.pickle "$(dirname $0)/lodel"
|
||||
./progs/create_instance test_instance $testdir "$install_model_dir" ./examples/em_test.pickle "$libdir"
|
||||
echo ./progs/create_instance test_instance $testdir "$install_model_dir" ./examples/em_test.pickle "$libdir"
|
||||
cp -R examples $testdir
|
||||
cp -R tests $testdir
|
||||
cd $testdir
|
||||
|
|
@ -70,4 +72,4 @@ make
|
|||
make refresh_plugins
|
||||
$PYTHON loader.py $@
|
||||
|
||||
rm -Rf $testdir
|
||||
#rm -Rf $testdir
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue