maj bbnurse

This commit is contained in:
Jephté Clain 2024-11-28 15:22:32 +04:00
parent 0f71fa0918
commit c43d22d55c
1 changed files with 35 additions and 3 deletions

38
bbnurse
View File

@ -147,7 +147,41 @@ function update_nurse() {
} }
function update_mature() { function update_mature() {
: srcpackage='nur\sery'
destpackage='nulib'
[ -n "$Dest" ] || Dest=.
setx Dest=abspath "$Dest"
etitle "Maturation de $srcpackage vers $destpackage"
sdestdir="$Dest/src"
if [ -d "$sdestdir" ]; then
setx rsdestdir=relpath "$sdestdir" "$Dest"
einfo "$rsdestdir"
setx -a sdests=find "$sdestdir" -type f
for sdest in "${sdests[@]}"; do
destname="${sdest#$Dest/src/}"
action "$destname" \
sed -i "s|${srcpackage//\\/\\\\}|${destpackage//\\/\\\\}|g" "$sdest"
done
else
ewarn "$rsdestdir: répertoire non trouvé. il sera ignoré"
fi
tdestdir="$Dest/tests"
if [ -d "$tdestdir" ]; then
setx rtdestdir=relpath "$tdestdir" "$Dest"
einfo "$rtdestdir"
setx -a tdests=find "$tdestdir" -type f
for tdest in "${tdests[@]}"; do
destname="${tdest#$Dest/tests/}"
action "$destname" \
sed -i "s|${srcpackage//\\/\\\\}|${destpackage//\\/\\\\}|g" "$tdest"
done
else
ewarn "$rtdestdir: répertoire non trouvé. il sera ignoré"
fi
eend
} }
action=copy action=copy
@ -160,8 +194,6 @@ args=(
-cn SRC -cn SRC
-u[n|m] package|Class [-d DEST] -u[n|m] package|Class [-d DEST]
IMPORTANT: pour l'instant, seule la copie à maturation (-cm) est implémentée
Il y a deux types d'évolutions possibles: Il y a deux types d'évolutions possibles:
* mettre en nurserie (-n) * mettre en nurserie (-n)
* arriver à maturation (-m) * arriver à maturation (-m)