From 19e9eb63417e3a11e0643159484408210c625170 Mon Sep 17 00:00:00 2001 From: Cyprian Laskowski Date: Thu, 25 Mar 2021 15:43:16 +0100 Subject: [PATCH] Redmine #1487: adjusted directory structure and tweaked setup script --- .gitignore | 7 ++----- resources/.gitignore | 7 ------- scripts/setup.sh | 24 ++++++++++++++---------- tmp/.gitignore | 2 -- 4 files changed, 16 insertions(+), 24 deletions(-) delete mode 100644 resources/.gitignore delete mode 100644 tmp/.gitignore diff --git a/.gitignore b/.gitignore index 6f03474..ff1a1aa 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,3 @@ /venv -/obeliks -/data_admin -/luscenje_struktur -/nova_slovnica -/xml_schemas +/lib +/resources \ No newline at end of file diff --git a/resources/.gitignore b/resources/.gitignore deleted file mode 100644 index 5006d66..0000000 --- a/resources/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -/classla -/dict.xml -/structures.xml -/structures.xsd -/inventory.xsd -/monolingual_dictionaries.xsd -/wani.py diff --git a/scripts/setup.sh b/scripts/setup.sh index 8315ead..60be9fd 100755 --- a/scripts/setup.sh +++ b/scripts/setup.sh @@ -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 .. diff --git a/tmp/.gitignore b/tmp/.gitignore deleted file mode 100644 index c96a04f..0000000 --- a/tmp/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -* -!.gitignore \ No newline at end of file