add init repo script checking submodules exist

This commit is contained in:
Tykayn 2023-10-05 14:25:14 +02:00 committed by tykayn
parent 4bb8381b53
commit 1fcc67d94f
3 changed files with 25 additions and 10 deletions

1
.gitignore vendored
View File

@ -8,6 +8,7 @@
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf
.idea
# AWS User-specific
.idea/**/aws.xml

View File

@ -1,14 +1,5 @@
default:
echo "installing teambrains dev tools"
pip install mkdocs
pip install mkdocs-material
echo "installing teambrains git submodules"
# https://git-scm.com/book/en/v2/Git-Tools-Submodules
git submodule add git@github.com:cogiway/faq2_api.git
git submodule add git@github.com:cogiway/faq2_example.git
git submodule add git@github.com:cogiway/faq2_model.git
git submodule init
echo "checking requirements"
bash init_repo.sh
documentation:
echo "build mkdoc"
mkdocs build

23
init_repo.sh Normal file
View File

@ -0,0 +1,23 @@
#!/bin/bash
echo "installing teambrains dev tools"
pip install mkdocs
pip install mkdocs-material
echo "installing teambrains git submodules"
# https://git-scm.com/book/en/v2/Git-Tools-Submodules
if [ -d "faq2_api" ]; then
git submodule add git@github.com:cogiway/faq2_api.git
fi
if [ -d "faq2_example" ]; then
git submodule add -f git@github.com:cogiway/faq2_example.git
fi
if [ ! hash mkdocs]; then
fi
if [ -d "faq2_model" ]; then
git submodule add -f git@github.com:cogiway/faq2_model.git
fi
git submodule init
git submodule sync
git submodule update
echo "checking requirements"