Skip to content
Snippets Groups Projects
Commit 66353d81 authored by Armand Bahi's avatar Armand Bahi
Browse files

Add init_vmap.sh

parent 3e103de3
No related branches found
No related tags found
No related merge requests found
......@@ -15,7 +15,8 @@
APP_NAME="vmap"
APP_MODULES=( vmap vm4ms anc cadastre cadastreV2 )
git rm $APP_NAME
# git rm -Rf $APP_NAME
git rm -Rf repos
# Vitis
echo "---- INIT Vitis ----"
......@@ -28,8 +29,41 @@ git subtree add --prefix ${APP_NAME}/client/conf "git@vm09.veremes.net:Developme
# Modules
for module in "${APP_MODULES[@]}"; do
echo "---- INIT ${module} ----"
# git clone "git@vm09.veremes.net:Development/vitis_apps/sources/module_${module}.git" $APP_NAME/repos/module_${module}
git subtree add --prefix ${APP_NAME}/client/modules/${module} "git@vm09.veremes.net:Development/vitis_apps/sources/module_${module}.git" module_split_branch
# Ajoute le dépôt
git clone "git@vm09.veremes.net:Development/vitis_apps/sources/module_${module}.git" repos/module_${module}
if [ -d "$(pwd)/repos/module_${module}/" ]; then
# Crée les branches contenant uniquement les dossiers cibles
cd repos/module_${module}/
if [ -d "$(pwd)/repos/module_${module}/module/" ]; then
git subtree split -P module/ -b module_split
fi
if [ -d "$(pwd)/repos/module_${module}/web_service/conf/" ]; then
git subtree split -P web_service/conf/ -b web_service_conf_split
fi
if [ -d "$(pwd)/repos/module_${module}/web_service/sql/" ]; then
git subtree split -P web_service/sql/ -b web_service_sql_split
fi
if [ -d "$(pwd)/repos/module_${module}/web_service/ws/" ]; then
git subtree split -P web_service/ws/ -b web_service_ws_split
fi
cd ../../
# Ajoute le module
if [ -d "$(pwd)/repos/module_${module}/module/" ]; then
git subtree add --prefix ${APP_NAME}/client/modules/${module} repos/module_${module}/.git module_split
fi
if [ -d "$(pwd)/repos/module_${module}/web_service/conf/" ]; then
git subtree add --prefix ${APP_NAME}/vas/rest/conf/${module} repos/module_${module}/.git web_service_conf_split
fi
if [ -d "$(pwd)/repos/module_${module}/web_service/ws/" ]; then
git subtree add --prefix ${APP_NAME}/vas/rest/ws/${module} repos/module_${module}/.git web_service_ws_split
fi
if [ -d "$(pwd)/repos/module_${module}/web_service/sql/" ]; then
git subtree add --prefix ${APP_NAME}/vas/sql/${module} repos/module_${module}/.git web_service_sql_split
fi
fi
done
git rm -Rf repos
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment