Redmine #1487: adjusted directory structure and tweaked setup script

This commit is contained in:
Cyprian Laskowski 2021-03-25 15:43:16 +01:00
parent 695dd78379
commit 19e9eb6341
4 changed files with 16 additions and 24 deletions

7
.gitignore vendored
View File

@ -1,6 +1,3 @@
/venv
/obeliks
/data_admin
/luscenje_struktur
/nova_slovnica
/xml_schemas
/lib
/resources

View File

@ -1,7 +0,0 @@
/classla
/dict.xml
/structures.xml
/structures.xsd
/inventory.xsd
/monolingual_dictionaries.xsd
/wani.py

View File

@ -1,13 +1,18 @@
#!/bin/bash
cd "$(dirname "$0")"
cd ..
mkdir lib resources
## get dependencies
cd lib
git clone git@gitea.cjvt.si:redmine_projects/nova_slovnica.git
git clone git@gitea.cjvt.si:ozbolt/luscenje_struktur.git
git clone git@gitea.cjvt.si:generic/data_admin.git
git clone git@gitea.cjvt.si:generic/xml_schemas.git
scp -P 3022 proc1.cjvt.si:/net/nas/resources/miscellaneous/structures/structures.xml .
cd ..
## prepare python environment
python3 -m venv venv
@ -17,19 +22,18 @@ pip install lxml
pip install psycopg2cffi
pip install sqlalchemy
pip install classla
python -c "import classla; classla.download('sl', type='standard_jos')" <<< $'Y\nresources/classla'
pip install obeliks
pip install nova_slovnica/python/package/
pip install luscenje_struktur/
python -c "import classla; classla.download('sl', type='standard_jos', dir='resources/classla')"
pip install lib/nova_slovnica/python/package/
pip install lib/luscenje_struktur/
pip install package/
deactivate
## put needed resources in place
cd resources
ln -s ../luscenje_struktur/wani.py .
ln -s ../nova_slovnica/resources/dict.xml .
ln -s ../data_admin/resources/structures.xsd .
ln -s ../xml_schemas/resources/schema/inventory.xsd .
ln -s ../xml_schemas/resources/schema/monolingual_dictionaries.xsd .
mv ../structures.xml .
ln -s ../lib/luscenje_struktur/wani.py .
ln -s ../lib/nova_slovnica/resources/dict.xml .
ln -s ../lib/data_admin/resources/structures.xsd .
ln -s ../lib/xml_schemas/resources/schema/inventory.xsd .
ln -s ../lib/xml_schemas/resources/schema/monolingual_dictionaries.xsd .
mv ../lib/structures.xml .
cd ..

2
tmp/.gitignore vendored
View File

@ -1,2 +0,0 @@
*
!.gitignore