chore: update .gitmodules (id_verif->dev), minor script/doc updates
This commit is contained in:
parent
cb55b82918
commit
69bc6f984e
2
.gitmodules
vendored
2
.gitmodules
vendored
@ -45,7 +45,7 @@
|
||||
[submodule "projects/id_verif/id_verif"]
|
||||
path = projects/id_verif/id_verif
|
||||
url = git@git.4nkweb.com:4nk/id_verif.git
|
||||
branch = docker-support-v2
|
||||
branch = dev
|
||||
[submodule "tor"]
|
||||
path = modules/tor
|
||||
url = https://github.com/torproject/tor.git
|
||||
|
||||
@ -8,4 +8,3 @@
|
||||
## [v2025.08.1] - 2025-08-28
|
||||
- Initialisation des modules et standardisation agents
|
||||
- Repos.csv + update_repos.sh
|
||||
|
||||
|
||||
@ -1,39 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
IFS=$'\n\t'
|
||||
|
||||
echo "[readd] lecture .gitmodules"
|
||||
mapfile -t entries < <(git config -f .gitmodules --name-only --get-regexp 'submodule\..*\.path' | sed -E 's/\.path$//')
|
||||
|
||||
for name in "${entries[@]}"; do
|
||||
path=$(git config -f .gitmodules --get "${name}.path" || true)
|
||||
url=$(git config -f .gitmodules --get "${name}.url" || true)
|
||||
branch=$(git config -f .gitmodules --get "${name}.branch" || echo "master")
|
||||
|
||||
if [ -z "${path}" ] || [ -z "${url}" ]; then
|
||||
echo "[readd][warn] entrée incomplète pour ${name}, ignoré" >&2
|
||||
continue
|
||||
fi
|
||||
|
||||
mkdir -p "$(dirname "${path}")"
|
||||
|
||||
if [ -d "${path}" ] && [ -d "${path}/.git" ]; then
|
||||
echo "[readd] déjà présent: ${path}"
|
||||
continue
|
||||
fi
|
||||
|
||||
if [ -d "${path}" ] && [ ! -d "${path}/.git" ]; then
|
||||
echo "[readd][warn] ${path} existe sans .git, on supprime et on recrée"
|
||||
rm -rf "${path}"
|
||||
fi
|
||||
|
||||
echo "[readd] ajout ${path} (${url}) branche=${branch}"
|
||||
if ! git submodule add -f -b "${branch}" "${url}" "${path}"; then
|
||||
echo "[readd][warn] échec ajout ${path}, on continue" >&2
|
||||
continue
|
||||
fi
|
||||
done
|
||||
|
||||
echo "[readd] submodules ajoutés, initialisation recursive"
|
||||
git submodule update --init --recursive
|
||||
echo "[readd] terminé"
|
||||
echo "[readd] git submodule update --init --recursive terminé"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user