Intégration de la branche release-9.14.0
This commit is contained in:
commit
c0d4e950e9
46
CHANGES.md
46
CHANGES.md
|
@ -1,3 +1,49 @@
|
||||||
|
## Version 9.14.0 du 15/03/2023-17:48
|
||||||
|
|
||||||
|
* `3ecb127` support docker compose v2
|
||||||
|
* `432ab6f` dkbuild: composer et mvn ne sont lancés qu'en mode build
|
||||||
|
* `01c14bb` regcp: ajout de l'option -n
|
||||||
|
* `0913c2e` upassword: rendre configurable le nombre de blocs
|
||||||
|
* `61433fb` dkbuild: revert image par défaut pour javabuilder
|
||||||
|
* `e4e0a55` pff: support mode vcs offline
|
||||||
|
* `e08c66b` pff: support des archives sh de l'amue
|
||||||
|
* `0d11932` dkbuild: corriger l'image javabuilder par défaut
|
||||||
|
* `3ead1f3` dkbuild: utiliser automatiquement l'image si nécessaire pour composer ou maven
|
||||||
|
* `93de256` ajout de regcp et regmv
|
||||||
|
* `5e33a36` rendre cohérent les en-têtes des scripts
|
||||||
|
* `9e13515` ajout exemple .dkbuild.env
|
||||||
|
* `c9e8110` dkbuild: corriger calcul des tags
|
||||||
|
* `c671cb3` dkbuild: fin support tag & last version
|
||||||
|
* `1a764f1` dkbuild: début support tag & last version
|
||||||
|
* `027f9b8` dkbuild: ajout de from_glob()
|
||||||
|
* `2293239` maj doc
|
||||||
|
* `9fc07bb` dkbuild: ajout build add-tags=
|
||||||
|
* `7b15f94` dkbuild: support préfixe et suffixe pour version
|
||||||
|
* `f2cfaee` dkbuild: calculer extract automatiquement
|
||||||
|
* `c36b8fb` dkbuild: corriger le support des paramètres sans argument
|
||||||
|
* `68a42d0` dkbuild: maj templates
|
||||||
|
* `306e77f` dkbuild: calcul de la version à partir d'un fichier ou d'un chemin
|
||||||
|
* `b006bb4` Maj des fichiers
|
||||||
|
* `6963d41` uproject: push -f force le push
|
||||||
|
* `9665d5a` cx-conndev: maj doc
|
||||||
|
* `137dfa9` repoctl, uproject: ne plus enlever le suffixe .git
|
||||||
|
* `440d2aa` upassword: maj nombre de blocs par défaut
|
||||||
|
* `f4047a3` ipaddr: forcer la sortie couleur
|
||||||
|
* `af1bdd3` Maj des fichiers
|
||||||
|
* `85e77e4` dkbuild: corriger le calcul de la dernière version d'une distribution
|
||||||
|
* `a56ec0e` dkbuild: améliorer clean
|
||||||
|
* `d6e78b9` dkbuild: maj messages debug
|
||||||
|
* `1699cc5` dkbuild: les fichiers d'environnement par défaut ont l'extension .env
|
||||||
|
* `2ae8406` maj doc dkbuild
|
||||||
|
* `1db7d08` maj doc cx-shelldev
|
||||||
|
* `aba08c2` maj update-nutools
|
||||||
|
* `e83b6d1` possibilité de choisir l'adresse IP
|
||||||
|
* `af9096d` ajouter le template fichier vide
|
||||||
|
* `89f0c09` typo
|
||||||
|
* `fb434c2` bug parse_date
|
||||||
|
* `f7ab14f` dkbuild: implémentation initiale
|
||||||
|
* `f46812f` cx-conndev: maj doc
|
||||||
|
|
||||||
## Version 9.13.0 du 07/02/2022-22:20
|
## Version 9.13.0 du 07/02/2022-22:20
|
||||||
|
|
||||||
* `06686d9` pff: support nettoyage wsdl/
|
* `06686d9` pff: support nettoyage wsdl/
|
||||||
|
|
4
EnsureVM
4
EnsureVM
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
source "$(dirname "$0")/lib/ulib/ulib" || exit 1
|
source "$(dirname -- "$0")/lib/ulib/auto" || exit 1
|
||||||
urequire DEFAULTS service
|
urequire service
|
||||||
|
|
||||||
function display_help() {
|
function display_help() {
|
||||||
uecho "$scriptname: s'assurer que les services sont lancés pour un type de virtualisation
|
uecho "$scriptname: s'assurer que les services sont lancés pour un type de virtualisation
|
||||||
|
|
4
SKvm
4
SKvm
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
source "$(dirname "$0")/lib/ulib/ulib" || exit 1
|
source "$(dirname -- "$0")/lib/ulib/auto" || exit 1
|
||||||
urequire DEFAULTS virsh
|
urequire virsh
|
||||||
|
|
||||||
function display_help() {
|
function display_help() {
|
||||||
uecho "$scriptname: lancer une machine virtuelle kvm
|
uecho "$scriptname: lancer une machine virtuelle kvm
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
source "$(dirname "$0")/lib/ulib/ulib" || exit 1
|
source "$(dirname -- "$0")/lib/ulib/auto" || exit 1
|
||||||
urequire DEFAULTS
|
|
||||||
|
|
||||||
function display_help() {
|
function display_help() {
|
||||||
uecho "$scriptname: lancer une machine virtuelle VirtualBox
|
uecho "$scriptname: lancer une machine virtuelle VirtualBox
|
||||||
|
|
5
TODO.md
5
TODO.md
|
@ -1,3 +1,8 @@
|
||||||
# TODO
|
# TODO
|
||||||
|
|
||||||
|
dkbuild
|
||||||
|
* setversion peut prendre la version depuis la branche git d'un dépôt
|
||||||
|
* un argument permettrait de spécifier comment la version est calculée à
|
||||||
|
partir du dépôt
|
||||||
|
|
||||||
-*- coding: utf-8 mode: markdown -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8:noeol:binary
|
-*- coding: utf-8 mode: markdown -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8:noeol:binary
|
|
@ -1 +1 @@
|
||||||
9.13.0
|
9.14.0
|
||||||
|
|
2
_root
2
_root
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
source "$(dirname "$0")/lib/ulib/ulib" || exit 1
|
source "$(dirname -- "$0")/lib/ulib/ulib" || exit 1
|
||||||
urequire base
|
urequire base
|
||||||
|
|
||||||
function display_help() {
|
function display_help() {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
source "$(dirname "$0")/lib/ulib/ulib" || exit 1
|
source "$(dirname -- "$0")/lib/ulib/auto" || exit 1
|
||||||
urequire DEFAULTS template apache.tools
|
urequire template apache.tools
|
||||||
apacheconfig_initvars
|
apacheconfig_initvars
|
||||||
|
|
||||||
function display_help() {
|
function display_help() {
|
||||||
|
|
3
authftp
3
authftp
|
@ -1,7 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
source "$(dirname "$0")/lib/ulib/ulib" || exit 1
|
source "$(dirname -- "$0")/lib/ulib/auto" || exit 1
|
||||||
urequire DEFAULTS
|
|
||||||
|
|
||||||
function display_help() {
|
function display_help() {
|
||||||
uecho "$scriptname: Se connecter sur un site FTP authentifié
|
uecho "$scriptname: Se connecter sur un site FTP authentifié
|
||||||
|
|
3
caturl
3
caturl
|
@ -1,7 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
source "$(dirname "$0")/lib/ulib/ulib" || exit 1
|
source "$(dirname -- "$0")/lib/ulib/auto" || exit 1
|
||||||
urequire DEFAULTS
|
|
||||||
|
|
||||||
function display_help() {
|
function display_help() {
|
||||||
uecho "$scriptname: Afficher une url
|
uecho "$scriptname: Afficher une url
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
source "$(dirname "$0")/lib/ulib/ulib" || exit 1
|
source "$(dirname -- "$0")/lib/ulib/auto" || exit 1
|
||||||
urequire DEFAULTS
|
|
||||||
|
|
||||||
function display_help() {
|
function display_help() {
|
||||||
uecho "$scriptname: créer un utilisateur sudoer et lui installer une clé publique ssh
|
uecho "$scriptname: créer un utilisateur sudoer et lui installer une clé publique ssh
|
||||||
|
|
3
cssh
3
cssh
|
@ -1,7 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
source "$(dirname "$0")/lib/ulib/ulib" || exit 1
|
source "$(dirname -- "$0")/lib/ulib/auto" || exit 1
|
||||||
urequire DEFAULTS
|
|
||||||
|
|
||||||
function display_help() {
|
function display_help() {
|
||||||
uecho "$scriptname: Faire une connexion ssh en lançant automatiquement un screen sur l'hôte distant
|
uecho "$scriptname: Faire une connexion ssh en lançant automatiquement un screen sur l'hôte distant
|
||||||
|
|
37
cx-conndev
37
cx-conndev
|
@ -1,18 +1,26 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
source "$(dirname "$0")/lib/ulib/ulib" || exit 1
|
source "$(dirname -- "$0")/lib/ulib/auto" || exit 1
|
||||||
urequire DEFAULTS
|
|
||||||
|
[ -n "$COMPOSE_V1" ] && DOCKER_COMPOSE=(docker-compose) || DOCKER_COMPOSE=(docker compose)
|
||||||
|
|
||||||
function display_help() {
|
function display_help() {
|
||||||
uecho "$scriptname: se connecter à la base MySQL
|
uecho "$scriptname: se connecter à la base MySQL
|
||||||
|
|
||||||
USAGE
|
USAGE
|
||||||
$scriptname [DATABASE]
|
$scriptname [DATABASE]
|
||||||
$scriptname -c|-d [-uUSER [-pPASSWORD]] ...
|
$scriptname -d [-uUSER [-pPASSWORD]] DATABASES... >backup.sql
|
||||||
|
$scriptname -c [-uUSER [-pPASSWORD]] <backup.sql
|
||||||
|
|
||||||
OPTIONS
|
OPTIONS
|
||||||
|
--compose-v1
|
||||||
|
Forcer l'utilisation de docker-compose v1
|
||||||
-h, -s, --service SERVICE
|
-h, -s, --service SERVICE
|
||||||
Spécifier le nom du service. La valeur par défaut est db
|
Spécifier le nom du service. La valeur par défaut est db
|
||||||
|
-i, --ipnum IPNUM
|
||||||
|
Si le service est dans plusieurs réseaux, sélectionner le numéro du
|
||||||
|
réseau à attaquer en commençant à 1 (la liste sera affichée si cette
|
||||||
|
option n'est pas spécifiée)
|
||||||
-c, --mysql-cmd
|
-c, --mysql-cmd
|
||||||
Lancer 'mysql -hSERVICE_IP' avec les arguments supplémentaires fournis
|
Lancer 'mysql -hSERVICE_IP' avec les arguments supplémentaires fournis
|
||||||
sur la ligne de commande
|
sur la ligne de commande
|
||||||
|
@ -28,6 +36,7 @@ OPTIONS
|
||||||
}
|
}
|
||||||
|
|
||||||
service=db
|
service=db
|
||||||
|
ipnum=
|
||||||
mysql_cmd=
|
mysql_cmd=
|
||||||
mysqldump_cmd=
|
mysqldump_cmd=
|
||||||
klean=
|
klean=
|
||||||
|
@ -35,7 +44,9 @@ user=
|
||||||
password=
|
password=
|
||||||
args=(
|
args=(
|
||||||
--help '$exit_with display_help'
|
--help '$exit_with display_help'
|
||||||
|
--compose-v1 '$DOCKER_COMPOSE=(docker-compose)'
|
||||||
-h:,-s:,--service: service=
|
-h:,-s:,--service: service=
|
||||||
|
-i:,--ipnum: ipnum=
|
||||||
-c,--mysql-cmd mysql_cmd=1
|
-c,--mysql-cmd mysql_cmd=1
|
||||||
-d,--mysqldump-cmd mysqldump_cmd=1
|
-d,--mysqldump-cmd mysqldump_cmd=1
|
||||||
-k,--klean klean=1
|
-k,--klean klean=1
|
||||||
|
@ -66,12 +77,26 @@ fi
|
||||||
###
|
###
|
||||||
|
|
||||||
function die_not_found() { die "$service: service introuvable. vérifiez que le projet est actuellement up"; }
|
function die_not_found() { die "$service: service introuvable. vérifiez que le projet est actuellement up"; }
|
||||||
setx cid=docker-compose ps -q "$service" 2>/dev/null || die_not_found
|
setx cid="${DOCKER_COMPOSE[@]}" ps -q "$service" 2>/dev/null || die_not_found
|
||||||
[ -n "$cid" ] || die_not_found
|
[ -n "$cid" ] || die_not_found
|
||||||
edebug "$service id: $cid"
|
edebug "$service id: $cid"
|
||||||
|
|
||||||
function die_not_found() { die "$service: $cid: ip introuvable"; }
|
function die_not_found() { die "$service: $cid: ip introuvable"; }
|
||||||
setx ip=docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' "$cid" || die_not_found
|
setx ip=docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}},{{end}}' "$cid" || die_not_found
|
||||||
|
[ -n "$ip" ] || die_not_found
|
||||||
|
ipdesc="${ip%,}"
|
||||||
|
if [ -z "$ipnum" ] && [[ "$ipdesc" == *,* ]]; then
|
||||||
|
enote "Le service est accessible sur plusieurs adresses ip: $ipdesc"
|
||||||
|
enote "Pensez à spécifier l'option -i pour désigner l'adresse à utiliser (-i1 pour la première, -i2 pour la seconde, etc.)"
|
||||||
|
fi
|
||||||
|
if [ -n "$ipnum" ]; then
|
||||||
|
let ipnum=ipnum-1
|
||||||
|
while [ $ipnum -gt 0 ]; do
|
||||||
|
ip="${ip#*,}"
|
||||||
|
let ipnum=ipnum-1
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
ip="${ip%%,*}"
|
||||||
[ -n "$ip" ] || die_not_found
|
[ -n "$ip" ] || die_not_found
|
||||||
edebug "$service ip: $ip"
|
edebug "$service ip: $ip"
|
||||||
|
|
||||||
|
@ -87,7 +112,7 @@ elif [ -n "$klean" ]; then
|
||||||
estep "wait 10sec..."
|
estep "wait 10sec..."
|
||||||
sleep 10
|
sleep 10
|
||||||
estep "start"
|
estep "start"
|
||||||
docker-compose start "$service"
|
"${DOCKER_COMPOSE[@]}" start "$service"
|
||||||
|
|
||||||
else
|
else
|
||||||
[ -f bin/conndev.php ] || die "Impossible de trouver le script compagnon conndev.php"
|
[ -f bin/conndev.php ] || die "Impossible de trouver le script compagnon conndev.php"
|
||||||
|
|
22
cx-shelldev
22
cx-shelldev
|
@ -1,29 +1,33 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
source "$(dirname "$0")/lib/ulib/ulib" || exit 1
|
source "$(dirname -- "$0")/lib/ulib/auto" || exit 1
|
||||||
urequire DEFAULTS
|
|
||||||
|
[ -n "$COMPOSE_V1" ] && DOCKER_COMPOSE=(docker-compose) || DOCKER_COMPOSE=(docker compose)
|
||||||
|
|
||||||
function display_help() {
|
function display_help() {
|
||||||
uecho "$scriptname: ouvrir un shell dans le container
|
uecho "$scriptname: ouvrir un shell dans le container
|
||||||
|
|
||||||
USAGE
|
USAGE
|
||||||
$scriptname [SHELL]
|
$scriptname [CMD...]
|
||||||
|
|
||||||
OPTIONS
|
OPTIONS
|
||||||
|
--compose-v1
|
||||||
|
Forcer l'utilisation de docker-compose v1
|
||||||
-h, -s, --service SERVICE
|
-h, -s, --service SERVICE
|
||||||
Spécifier le nom du service sur lequel ouvrir le shell
|
Spécifier le nom du service sur lequel ouvrir le shell
|
||||||
-d
|
-d, --db
|
||||||
équivalent à -s db
|
équivalent à -s db
|
||||||
-w
|
-w, --web
|
||||||
équivalent à -s web (c'est la valeur par défaut)"
|
équivalent à -s web (c'est la valeur par défaut)"
|
||||||
}
|
}
|
||||||
|
|
||||||
service=web
|
service=web
|
||||||
args=(
|
args=(
|
||||||
--help '$exit_with display_help'
|
--help '$exit_with display_help'
|
||||||
|
--compose-v1 '$DOCKER_COMPOSE=(docker-compose)'
|
||||||
-h:,-s:,--service: service=
|
-h:,-s:,--service: service=
|
||||||
-d service=db
|
-d,--db service=db
|
||||||
-w service=web
|
-w,--web service=web
|
||||||
)
|
)
|
||||||
parse_args "$@"; set -- "${args[@]}"
|
parse_args "$@"; set -- "${args[@]}"
|
||||||
|
|
||||||
|
@ -48,9 +52,9 @@ fi
|
||||||
|
|
||||||
###
|
###
|
||||||
|
|
||||||
setx cid=docker-compose ps -q "$service" 2>/dev/null || die "$service: service introuvable"
|
setx cid="${DOCKER_COMPOSE[@]}" ps -q "$service" 2>/dev/null || die "$service: service introuvable"
|
||||||
|
|
||||||
cmd=("$@")
|
cmd=("$@")
|
||||||
[ ${#cmd[*]} -gt 0 ] || cmd=(bash)
|
[ ${#cmd[*]} -gt 0 ] || cmd=(bash)
|
||||||
|
|
||||||
docker-compose exec "$service" "${cmd[@]}"
|
"${DOCKER_COMPOSE[@]}" exec "$service" "${cmd[@]}"
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
source "$(dirname "$0")/lib/ulib/ulib" || exit 1
|
source "$(dirname -- "$0")/lib/ulib/auto" || exit 1
|
||||||
urequire DEFAULTS
|
|
||||||
|
|
||||||
function display_help() {
|
function display_help() {
|
||||||
uecho "$scriptname: mettre à jour un module ur/* ou lib/* sans utiliser composer
|
uecho "$scriptname: mettre à jour un module ur/* ou lib/* sans utiliser composer
|
||||||
|
|
46
dk
46
dk
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
source "$(dirname "$0")/lib/ulib/auto" || exit 1
|
source "$(dirname -- "$0")/lib/ulib/auto" || exit 1
|
||||||
urequire pff json
|
urequire pff json
|
||||||
|
|
||||||
function display_help() {
|
function display_help() {
|
||||||
|
@ -1237,7 +1237,7 @@ function default_update_build_env() {
|
||||||
function update_build_env() { default_update_build_env "$@"; }
|
function update_build_env() { default_update_build_env "$@"; }
|
||||||
|
|
||||||
function default_compose_build() {
|
function default_compose_build() {
|
||||||
${FAKE:+qvals} docker-compose \
|
${FAKE:+qvals} "${DOCKER_COMPOSE[@]}" \
|
||||||
"${replace_env_args[@]}" "${env_args[@]}" \
|
"${replace_env_args[@]}" "${env_args[@]}" \
|
||||||
build \
|
build \
|
||||||
${NO_CACHE:+--no-cache} \
|
${NO_CACHE:+--no-cache} \
|
||||||
|
@ -1307,7 +1307,7 @@ function auto_build() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function default_compose_push() {
|
function default_compose_push() {
|
||||||
${FAKE:+qvals} docker-compose \
|
${FAKE:+qvals} "${DOCKER_COMPOSE[@]}" \
|
||||||
"${replace_env_args[@]}" "${env_args[@]}" \
|
"${replace_env_args[@]}" "${env_args[@]}" \
|
||||||
push \
|
push \
|
||||||
"$@"
|
"$@"
|
||||||
|
@ -1345,7 +1345,7 @@ function auto_push() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function default_compose_up() {
|
function default_compose_up() {
|
||||||
${FAKE:+qvals} docker-compose \
|
${FAKE:+qvals} "${DOCKER_COMPOSE[@]}" \
|
||||||
"${replace_env_args[@]}" "${env_args[@]}" \
|
"${replace_env_args[@]}" "${env_args[@]}" \
|
||||||
up "${replace_run_args[@]}" "${run_args[@]}" \
|
up "${replace_run_args[@]}" "${run_args[@]}" \
|
||||||
"${replace_user_args[@]}" "${user_args[@]}" "$@"
|
"${replace_user_args[@]}" "${user_args[@]}" "$@"
|
||||||
|
@ -1379,7 +1379,7 @@ function auto_up() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function default_compose_stop() {
|
function default_compose_stop() {
|
||||||
${FAKE:+qvals} docker-compose \
|
${FAKE:+qvals} "${DOCKER_COMPOSE[@]}" \
|
||||||
"${replace_env_args[@]}" "${env_args[@]}" \
|
"${replace_env_args[@]}" "${env_args[@]}" \
|
||||||
stop "${replace_stop_args[@]}" "${stop_args[@]}" \
|
stop "${replace_stop_args[@]}" "${stop_args[@]}" \
|
||||||
"$@"
|
"$@"
|
||||||
|
@ -1408,7 +1408,7 @@ function auto_stop() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function default_compose_logs() {
|
function default_compose_logs() {
|
||||||
${FAKE:+qvals} docker-compose \
|
${FAKE:+qvals} "${DOCKER_COMPOSE[@]}" \
|
||||||
"${replace_env_args[@]}" "${env_args[@]}" \
|
"${replace_env_args[@]}" "${env_args[@]}" \
|
||||||
logs "${replace_logs_args[@]}" "${logs_args[@]}" \
|
logs "${replace_logs_args[@]}" "${logs_args[@]}" \
|
||||||
"$@"
|
"$@"
|
||||||
|
@ -1439,7 +1439,7 @@ function auto_logs() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function default_compose_down() {
|
function default_compose_down() {
|
||||||
${FAKE:+qvals} docker-compose \
|
${FAKE:+qvals} "${DOCKER_COMPOSE[@]}" \
|
||||||
"${replace_env_args[@]}" "${env_args[@]}" \
|
"${replace_env_args[@]}" "${env_args[@]}" \
|
||||||
down "${replace_down_args[@]}" "${down_args[@]}" \
|
down "${replace_down_args[@]}" "${down_args[@]}" \
|
||||||
"$@"
|
"$@"
|
||||||
|
@ -1474,7 +1474,7 @@ function auto_down() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function default_compose_run() {
|
function default_compose_run() {
|
||||||
${FAKE:+qvals} docker-compose \
|
${FAKE:+qvals} "${DOCKER_COMPOSE[@]}" \
|
||||||
"${replace_env_args[@]}" "${env_args[@]}" \
|
"${replace_env_args[@]}" "${env_args[@]}" \
|
||||||
run "${replace_run_args[@]}" "${run_args[@]}" \
|
run "${replace_run_args[@]}" "${run_args[@]}" \
|
||||||
"${replace_user_args[@]}" "${user_args[@]}" "$@"
|
"${replace_user_args[@]}" "${user_args[@]}" "$@"
|
||||||
|
@ -1545,7 +1545,7 @@ function auto_run() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function default_compose_exec() {
|
function default_compose_exec() {
|
||||||
${FAKE:+qvals} docker-compose \
|
${FAKE:+qvals} "${DOCKER_COMPOSE[@]}" \
|
||||||
"${replace_env_args[@]}" "${env_args[@]}" \
|
"${replace_env_args[@]}" "${env_args[@]}" \
|
||||||
exec "${replace_exec_args[@]}" "${exec_args[@]}" \
|
exec "${replace_exec_args[@]}" "${exec_args[@]}" \
|
||||||
"$@"
|
"$@"
|
||||||
|
@ -1759,7 +1759,7 @@ function auto_status() {
|
||||||
function default_compose_show_ip() {
|
function default_compose_show_ip() {
|
||||||
local -a cmd cids; local cid
|
local -a cmd cids; local cid
|
||||||
cmd=(
|
cmd=(
|
||||||
docker-compose
|
"${DOCKER_COMPOSE[@]}"
|
||||||
"${replace_env_args[@]}" "${env_args[@]}"
|
"${replace_env_args[@]}" "${env_args[@]}"
|
||||||
ps -q "${replace_show_ip_args[@]}" "${show_ip_args[@]}"
|
ps -q "${replace_show_ip_args[@]}" "${show_ip_args[@]}"
|
||||||
"$@"
|
"$@"
|
||||||
|
@ -1795,7 +1795,23 @@ function auto_show_ip() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function default_compose_systemd_unit() {
|
function default_compose_systemd_unit() {
|
||||||
local docker_compose="$(which docker-compose 2>/dev/null)"
|
local -a docker_compose
|
||||||
|
if [ "${DOCKER_COMPOSE[0]}" == docker ]; then
|
||||||
|
# compose v2
|
||||||
|
local docker="$(which docker 2>/dev/null)"
|
||||||
|
if [ -z "$docker" ]; then
|
||||||
|
if [ -x /usr/bin/docker ]; then
|
||||||
|
docker=/usr/bin/docker
|
||||||
|
elif [ -x /usr/local/bin/docker ]; then
|
||||||
|
docker=/usr/local/bin/docker
|
||||||
|
else
|
||||||
|
die "Impossible de trouver docker"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
docker_compose=("$docker" compose)
|
||||||
|
else
|
||||||
|
# compose v1
|
||||||
|
docker_compose="$(which docker-compose 2>/dev/null)"
|
||||||
if [ -z "$docker_compose" ]; then
|
if [ -z "$docker_compose" ]; then
|
||||||
if [ -x /usr/bin/docker-compose ]; then
|
if [ -x /usr/bin/docker-compose ]; then
|
||||||
docker_compose=/usr/bin/docker-compose
|
docker_compose=/usr/bin/docker-compose
|
||||||
|
@ -1805,11 +1821,12 @@ function default_compose_systemd_unit() {
|
||||||
die "Impossible de trouver docker-compose"
|
die "Impossible de trouver docker-compose"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
setx startcmd=qvals "$docker_compose" \
|
fi
|
||||||
|
setx startcmd=qvals "${docker_compose[@]}" \
|
||||||
"${replace_env_args[@]}" "${env_args[@]}" \
|
"${replace_env_args[@]}" "${env_args[@]}" \
|
||||||
up "${replace_run_args[@]}" "${run_args[@]}" \
|
up "${replace_run_args[@]}" "${run_args[@]}" \
|
||||||
"${replace_user_args[@]}" "${user_args[@]}" "$@"
|
"${replace_user_args[@]}" "${user_args[@]}" "$@"
|
||||||
setx stopcmd=qvals "$docker_compose" down
|
setx stopcmd=qvals "${docker_compose[@]}" down
|
||||||
}
|
}
|
||||||
function default_docker_systemd_unit() {
|
function default_docker_systemd_unit() {
|
||||||
local docker="$(which "$DOCKER" 2>/dev/null)"
|
local docker="$(which "$DOCKER" 2>/dev/null)"
|
||||||
|
@ -2390,6 +2407,8 @@ elif progexists podman; then DOCKER=podman
|
||||||
else DOCKER=docker
|
else DOCKER=docker
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
[ -n "$COMPOSE_V1" ] && DOCKER_COMPOSE=(docker-compose) || DOCKER_COMPOSE=(docker compose)
|
||||||
|
|
||||||
DEFAULT_PROFILE=devel
|
DEFAULT_PROFILE=devel
|
||||||
PROFILE=
|
PROFILE=
|
||||||
DM_ALIASES=()
|
DM_ALIASES=()
|
||||||
|
@ -2431,6 +2450,7 @@ update_apps_origin=
|
||||||
update_apps_branch=
|
update_apps_branch=
|
||||||
args=(
|
args=(
|
||||||
--help '$exit_with display_help'
|
--help '$exit_with display_help'
|
||||||
|
--compose-v1 '$DOCKER_COMPOSE=(docker-compose)'
|
||||||
-d:,--chdir: chdir=
|
-d:,--chdir: chdir=
|
||||||
-c:,--config: CONFIG=
|
-c:,--config: CONFIG=
|
||||||
-p:,--profile: PROFILE=
|
-p:,--profile: PROFILE=
|
||||||
|
|
2
dmcerts
2
dmcerts
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
source /etc/ulibauto || exit 1
|
source "$(dirname -- "$0")/lib/ulib/auto" || exit 1
|
||||||
urequire install
|
urequire install
|
||||||
|
|
||||||
function display_help() {
|
function display_help() {
|
||||||
|
|
2
dmctl
2
dmctl
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
source /etc/ulibauto || exit 1
|
source "$(dirname -- "$0")/lib/ulib/auto" || exit 1
|
||||||
|
|
||||||
function display_help() {
|
function display_help() {
|
||||||
uecho "$scriptname: import/exporter une docker-machine
|
uecho "$scriptname: import/exporter une docker-machine
|
||||||
|
|
|
@ -11,7 +11,7 @@ if [ "$#" -eq 1 -a "$1" == --nutools-makelinks ]; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
source "$(dirname "$0")/lib/ulib/ulib" || exit 1
|
source "$(dirname -- "$0")/lib/ulib/ulib" || exit 1
|
||||||
urequire base
|
urequire base
|
||||||
|
|
||||||
function display_help() {
|
function display_help() {
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
source "$(dirname "$0")/lib/ulib/ulib" || exit 1
|
source "$(dirname -- "$0")/lib/ulib/auto" || exit 1
|
||||||
urequire DEFAULTS
|
|
||||||
|
|
||||||
function display_help() {
|
function display_help() {
|
||||||
uecho "$scriptname: afficher les connexions TCP entrantes sur un port
|
uecho "$scriptname: afficher les connexions TCP entrantes sur un port
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
source "$(dirname "$0")/lib/ulib/ulib" || exit 1
|
source "$(dirname -- "$0")/lib/ulib/auto" || exit 1
|
||||||
urequire DEFAULTS ipcalc
|
urequire ipcalc
|
||||||
|
|
||||||
function display_help() {
|
function display_help() {
|
||||||
uecho "$scriptname: s'assurer que l'hôte courant a l'adresse IP spécifiée
|
uecho "$scriptname: s'assurer que l'hôte courant a l'adresse IP spécifiée
|
||||||
|
|
3
fconv
3
fconv
|
@ -1,7 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
source "$(dirname "$0")/lib/ulib/ulib" || exit 1
|
source "$(dirname -- "$0")/lib/ulib/auto" || exit 1
|
||||||
urequire DEFAULTS
|
|
||||||
|
|
||||||
function display_help() {
|
function display_help() {
|
||||||
uecho "$scriptname: convertir un fichier ou les fichiers d'un répertoire
|
uecho "$scriptname: convertir un fichier ou les fichiers d'un répertoire
|
||||||
|
|
3
fnconv
3
fnconv
|
@ -1,7 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
source "$(dirname "$0")/lib/ulib/ulib" || exit 1
|
source "$(dirname -- "$0")/lib/ulib/auto" || exit 1
|
||||||
urequire DEFAULTS
|
|
||||||
|
|
||||||
function display_help() {
|
function display_help() {
|
||||||
uecho "$scriptname: renommer un fichier ou les fichiers d'un répertoire
|
uecho "$scriptname: renommer un fichier ou les fichiers d'un répertoire
|
||||||
|
|
3
fndate
3
fndate
|
@ -11,8 +11,7 @@ if [ "$#" -eq 1 -a "$1" == --nutools-makelinks ]; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
source "$(dirname "$0")/lib/ulib/ulib" || exit 1
|
source "$(dirname -- "$0")/lib/ulib/auto" || exit 1
|
||||||
urequire DEFAULTS
|
|
||||||
|
|
||||||
function display_help() {
|
function display_help() {
|
||||||
uecho "$scriptname: manipuler des noms de fichier pour les dater
|
uecho "$scriptname: manipuler des noms de fichier pour les dater
|
||||||
|
|
3
foreach
3
foreach
|
@ -1,7 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
source "$(dirname "$0")/lib/ulib/ulib" || exit 1
|
source "$(dirname -- "$0")/lib/ulib/auto" || exit 1
|
||||||
urequire DEFAULTS
|
|
||||||
|
|
||||||
function display_help() {
|
function display_help() {
|
||||||
uecho "$scriptname: lancer une commande pour un ensemble d'arguments
|
uecho "$scriptname: lancer une commande pour un ensemble d'arguments
|
||||||
|
|
3
geturl
3
geturl
|
@ -1,7 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
source "$(dirname "$0")/lib/ulib/ulib" || exit 1
|
source "$(dirname -- "$0")/lib/ulib/auto" || exit 1
|
||||||
urequire DEFAULTS
|
|
||||||
|
|
||||||
function display_help() {
|
function display_help() {
|
||||||
uecho "$scriptname: Télécharger un fichier avec wget ou curl
|
uecho "$scriptname: Télécharger un fichier avec wget ou curl
|
||||||
|
|
4
ipaddr
4
ipaddr
|
@ -7,7 +7,9 @@ elif [ -x /bin/ip ]; then IP=/bin/ip
|
||||||
else IP=ip
|
else IP=ip
|
||||||
fi
|
fi
|
||||||
|
|
||||||
tty -s <&1 && isatty=1 || isatty=
|
if [ -n "IPADDR_COLOR" ]; then isatty=1
|
||||||
|
else tty -s <&1 && isatty=1 || isatty=
|
||||||
|
fi
|
||||||
|
|
||||||
"$IP" addr "$@" | awk -v isatty="$isatty" '
|
"$IP" addr "$@" | awk -v isatty="$isatty" '
|
||||||
isatty && $0 ~ /^[0-9]/ {
|
isatty && $0 ~ /^[0-9]/ {
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
|
if profile prod test; then
|
||||||
|
setenv REGISTRY=docker.univ-reunion.fr
|
||||||
|
else
|
||||||
|
setenv REGISTRY=docker.self
|
||||||
|
fi
|
|
@ -0,0 +1 @@
|
||||||
|
php
|
|
@ -0,0 +1,3 @@
|
||||||
|
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tar.gz filter=lfs diff=lfs merge=lfs -text
|
|
@ -0,0 +1,2 @@
|
||||||
|
.~lock*#
|
||||||
|
.*.swp
|
|
@ -0,0 +1,3 @@
|
||||||
|
# -*- coding: utf-8 mode: dockerfile -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
|
FROM $REGISTRY/debian/min:$DIST
|
||||||
|
#RUN /debian/pkg i
|
|
@ -0,0 +1,2 @@
|
||||||
|
/b/t/
|
||||||
|
**/.git/
|
|
@ -0,0 +1,3 @@
|
||||||
|
/b/
|
||||||
|
/Dockerfile
|
||||||
|
# autogénéré
|
|
@ -0,0 +1,11 @@
|
||||||
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
|
setdists d11
|
||||||
|
|
||||||
|
# fichiers communs
|
||||||
|
copy ../common/ ./ gitignore=.
|
||||||
|
|
||||||
|
dockerfile "" Dockerfile.in sed="
|
||||||
|
s/\\\$REGISTRY/$REGISTRY/
|
||||||
|
s/\\\$DIST/$DIST/
|
||||||
|
"
|
||||||
|
build
|
|
@ -0,0 +1 @@
|
||||||
|
../dkbuild.env
|
|
@ -0,0 +1,9 @@
|
||||||
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
|
dists=(
|
||||||
|
d11
|
||||||
|
)
|
||||||
|
setdists "${dists[@]}"
|
||||||
|
|
||||||
|
if dist d11; then
|
||||||
|
include d11
|
||||||
|
fi
|
|
@ -0,0 +1,3 @@
|
||||||
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
|
setenv REGISTRY=docker.univ-reunion.fr
|
||||||
|
setenv IMAGE=$REGISTRY/GROUP/NAME
|
|
@ -0,0 +1,3 @@
|
||||||
|
/Dockerfile
|
||||||
|
.~lock*#
|
||||||
|
.*.swp
|
|
@ -0,0 +1,25 @@
|
||||||
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
|
if profile prod; then
|
||||||
|
default checkout branch=master
|
||||||
|
elif profile test devel; then
|
||||||
|
default checkout branch=develop
|
||||||
|
fi
|
||||||
|
default composer image=$REGISTRY/image/phpbuilder:$DIST
|
||||||
|
|
||||||
|
## web ########################################################################
|
||||||
|
checkout https://git.univ-reunion.fr/sda-php/NAME-app b/web
|
||||||
|
composer b/web
|
||||||
|
|
||||||
|
dockerfile
|
||||||
|
# -*- coding: utf-8 mode: dockerfile -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
|
FROM $REGISTRY/image/apache-php-myiccas:$DIST
|
||||||
|
#RUN /debian/pkg i
|
||||||
|
|
||||||
|
#ENV MSMTP_ENABLE=1
|
||||||
|
#COPY b/web/config/msmtp /msmtp-config
|
||||||
|
COPY b/web/config/ssl /ssl-config
|
||||||
|
COPY b/web/config/apache /apache-config
|
||||||
|
COPY b/web/config/php /php-config
|
||||||
|
#COPY b/web/config/before-start-apache /
|
||||||
|
COPY b/web /var/www/app
|
||||||
|
build
|
|
@ -0,0 +1,4 @@
|
||||||
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
|
setenv REGISTRY=docker.univ-reunion.fr
|
||||||
|
setenv IMAGE=$REGISTRY/GROUP/NAME
|
||||||
|
setenv DIST=d11
|
|
@ -0,0 +1,6 @@
|
||||||
|
/docker-compose.yml
|
||||||
|
/docker-compose.*.yml
|
||||||
|
/web/Dockerfile
|
||||||
|
/db/Dockerfile
|
||||||
|
.~lock*#
|
||||||
|
.*.swp
|
|
@ -0,0 +1,37 @@
|
||||||
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
|
setprofiles prod test devel
|
||||||
|
|
||||||
|
if profile prod; then
|
||||||
|
default checkout branch=master
|
||||||
|
elif profile test devel; then
|
||||||
|
default checkout branch=develop
|
||||||
|
fi
|
||||||
|
default composer image=$REGISTRY/image/phpbuilder:$DIST
|
||||||
|
|
||||||
|
## web ########################################################################
|
||||||
|
|
||||||
|
checkout https://git.univ-reunion.fr/sda-php/NAME-app web/b/web
|
||||||
|
composer web/b/web
|
||||||
|
|
||||||
|
dockerfile context=web
|
||||||
|
# -*- coding: utf-8 mode: dockerfile -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
|
FROM $REGISTRY/image/apache-php-myiccas:$DIST
|
||||||
|
#RUN /debian/pkg i
|
||||||
|
|
||||||
|
#ENV MSMTP_ENABLE=1
|
||||||
|
#COPY b/web/config/msmtp /msmtp-config
|
||||||
|
COPY b/web/config/ssl /ssl-config
|
||||||
|
COPY b/web/config/apache /apache-config
|
||||||
|
COPY b/web/config/php /php-config
|
||||||
|
#COPY b/web/config/before-start-apache /
|
||||||
|
COPY b/web /var/www/app
|
||||||
|
|
||||||
|
## db #########################################################################
|
||||||
|
|
||||||
|
copy web/b/web/config/sqlmig db/config/mariadb/sqlmig
|
||||||
|
|
||||||
|
dockerfile context=db
|
||||||
|
# -*- coding: utf-8 mode: dockerfile -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
|
FROM $REGISTRY/image/mariadb:$DIST
|
||||||
|
|
||||||
|
COPY config/mariadb /mariadb-config
|
|
@ -0,0 +1,4 @@
|
||||||
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
|
setenv REGISTRY=docker.univ-reunion.fr
|
||||||
|
setenv IMAGE=$REGISTRY/GROUP/NAME
|
||||||
|
setenv DIST=d11
|
|
@ -0,0 +1,12 @@
|
||||||
|
# -*- coding: utf-8 mode: yaml -*- vim:sw=2:sts=2:et:ai:si:sta:fenc=utf-8
|
||||||
|
version: "3.7"
|
||||||
|
|
||||||
|
services:
|
||||||
|
db:
|
||||||
|
image: $REGISTRY/devel/GROUP/NAME-db
|
||||||
|
|
||||||
|
web:
|
||||||
|
image: $REGISTRY/devel/GROUP/NAME-web
|
||||||
|
environment:
|
||||||
|
- APP_PROFILE=devel
|
||||||
|
- BASE_URL=http://NAME.self
|
|
@ -0,0 +1,14 @@
|
||||||
|
# -*- coding: utf-8 mode: yaml -*- vim:sw=2:sts=2:et:ai:si:sta:fenc=utf-8
|
||||||
|
version: "3.7"
|
||||||
|
|
||||||
|
services:
|
||||||
|
db:
|
||||||
|
image: $REGISTRY/GROUP/NAME-db
|
||||||
|
|
||||||
|
web:
|
||||||
|
image: $REGISTRY/GROUP/NAME-web
|
||||||
|
environment:
|
||||||
|
- APP_PROFILE=prod
|
||||||
|
- BASE_URL=https://NAME.univ-reunion.fr
|
||||||
|
extra_hosts:
|
||||||
|
- "casn.univ-reunion.fr:10.85.1.15"
|
|
@ -0,0 +1,14 @@
|
||||||
|
# -*- coding: utf-8 mode: yaml -*- vim:sw=2:sts=2:et:ai:si:sta:fenc=utf-8
|
||||||
|
version: "3.7"
|
||||||
|
|
||||||
|
services:
|
||||||
|
db:
|
||||||
|
image: $REGISTRY/test/GROUP/NAME-db
|
||||||
|
|
||||||
|
web:
|
||||||
|
image: $REGISTRY/test/GROUP/NAME-web
|
||||||
|
environment:
|
||||||
|
- APP_PROFILE=test
|
||||||
|
- BASE_URL=https://NAME-test.univ-reunion.fr
|
||||||
|
extra_hosts:
|
||||||
|
- "casn.univ-reunion.fr:10.85.1.15"
|
|
@ -0,0 +1,34 @@
|
||||||
|
# -*- coding: utf-8 mode: yaml -*- vim:sw=2:sts=2:et:ai:si:sta:fenc=utf-8
|
||||||
|
version: "3.7"
|
||||||
|
|
||||||
|
services:
|
||||||
|
db:
|
||||||
|
build: db
|
||||||
|
volumes:
|
||||||
|
- db-data:/var/lib/mysql
|
||||||
|
networks:
|
||||||
|
default:
|
||||||
|
aliases:
|
||||||
|
- NAMEdb
|
||||||
|
deploy:
|
||||||
|
update_config:
|
||||||
|
order: stop-first
|
||||||
|
|
||||||
|
web:
|
||||||
|
build: web
|
||||||
|
volumes:
|
||||||
|
- log-data:/var/log/apache2
|
||||||
|
- session-data:/var/lib/php/sessions
|
||||||
|
extra_hosts:
|
||||||
|
- "smtp.univ.run:10.82.70.46"
|
||||||
|
- "vs-apoprod-bdd.univ.run:10.82.91.11"
|
||||||
|
- "vs-apotest-bdd.univ.run:10.82.91.13"
|
||||||
|
- "vs-apodevp-bdd.univ.run:10.82.91.15"
|
||||||
|
deploy:
|
||||||
|
update_config:
|
||||||
|
order: start-first
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
db-data:
|
||||||
|
log-data:
|
||||||
|
session-data:
|
|
@ -0,0 +1,8 @@
|
||||||
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
|
# Description des templates de ce répertoire
|
||||||
|
|
||||||
|
TEMPLATES=(
|
||||||
|
[image]="Image générique basée sur debian"
|
||||||
|
[php]="Application web PHP"
|
||||||
|
[php_db]="Application web PHP avec base de données"
|
||||||
|
)
|
|
@ -0,0 +1,5 @@
|
||||||
|
/Dockerfile
|
||||||
|
/src
|
||||||
|
/dest
|
||||||
|
/srcdir/
|
||||||
|
/destdir/
|
|
@ -0,0 +1,2 @@
|
||||||
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
|
setenv REGISTRY=jclain.fr
|
|
@ -0,0 +1,16 @@
|
||||||
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
|
|
||||||
|
section "variables de build"
|
||||||
|
setarg A="arg A"
|
||||||
|
resetarg B="arg B"
|
||||||
|
|
||||||
|
info "A=${ARGS[A]}, B=${ARGS[B]}"
|
||||||
|
if [ "${ARGS[A]}" != x ]; then
|
||||||
|
note "\
|
||||||
|
Essayer de relancer avec
|
||||||
|
$(qvals dkbuild -j "$(relpath "$DKBUILD")" --arg A=x --arg B=y)
|
||||||
|
on ne devrait pas pouvoir modifier la valeur de B"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# pas de build automatique
|
||||||
|
AUTOBUILD=
|
|
@ -0,0 +1,13 @@
|
||||||
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
|
setenv REGISTRY=docker.univ-reunion.fr
|
||||||
|
setenv IMAGE=$REGISTRY/group/name
|
||||||
|
|
||||||
|
info "IMAGE=$IMAGE"
|
||||||
|
if [ "$REGISTRY" == docker.univ-reunion.fr ]; then
|
||||||
|
note "\
|
||||||
|
Essayer de relancer avec
|
||||||
|
$(qvals dkbuild -j "$(relpath "$DKBUILD")" -c registry.env)
|
||||||
|
La valeur de IMAGE devrait changer"
|
||||||
|
fi
|
||||||
|
|
||||||
|
AUTOBUILD=
|
|
@ -0,0 +1,15 @@
|
||||||
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
|
|
||||||
|
run rm -rf src dest srcdir destdir
|
||||||
|
|
||||||
|
run mkdir srcdir
|
||||||
|
genfile srcdir/src <<<"file"
|
||||||
|
run ln -s src srcdir/link
|
||||||
|
|
||||||
|
copy srcdir destdir
|
||||||
|
if run; then
|
||||||
|
[ -f destdir/src ] || die "destdir/src n'a pas été créé"
|
||||||
|
diff -qr srcdir destdir || die "srcdir et destdir ne sont pas identiques"
|
||||||
|
fi
|
||||||
|
|
||||||
|
AUTOBUILD=
|
|
@ -0,0 +1,13 @@
|
||||||
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
|
|
||||||
|
run rm -rf src dest srcdir destdir
|
||||||
|
|
||||||
|
run mkdir srcdir
|
||||||
|
genfile srcdir/src <<<"file"
|
||||||
|
run ln -s src srcdir/link
|
||||||
|
genfile dest <<<"dest"
|
||||||
|
|
||||||
|
copy srcdir dest
|
||||||
|
info "on ne devrait pas arriver ici"
|
||||||
|
|
||||||
|
AUTOBUILD=
|
|
@ -0,0 +1,13 @@
|
||||||
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
|
setdists d11 d10
|
||||||
|
setprofiles prod test
|
||||||
|
|
||||||
|
if dist LATEST; then
|
||||||
|
info "$DIST est la distribution la plus récente"
|
||||||
|
fi
|
||||||
|
if profile DEFAULT; then
|
||||||
|
info "$PROFILE est le profil par défaut"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# pas de build automatique
|
||||||
|
AUTOBUILD=
|
|
@ -0,0 +1,20 @@
|
||||||
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
|
setdists v1-d11 v2-d11 v1-d10
|
||||||
|
setenv IMAGE=dkbuild-tests/distversions
|
||||||
|
|
||||||
|
dockerfile
|
||||||
|
# -*- coding: utf-8 mode: dockerfile -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
|
FROM scratch
|
||||||
|
ENV var=$DIST-$VERSION
|
||||||
|
build
|
||||||
|
|
||||||
|
info "vérifier les images construites avec
|
||||||
|
dk ls dkbuild-tests/distversions
|
||||||
|
on devrait avoir les images suivantes:
|
||||||
|
dkbuild-tests/distversions:v1-d10
|
||||||
|
dkbuild-tests/distversions:d10 -> v1-d10
|
||||||
|
dkbuild-tests/distversions:v1-d11
|
||||||
|
dkbuild-tests/distversions:v2-d11
|
||||||
|
dkbuild-tests/distversions:d11 -> v2-d11
|
||||||
|
dkbuild-tests/distversions:latest -> v2-d11
|
||||||
|
"
|
|
@ -0,0 +1,14 @@
|
||||||
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
|
|
||||||
|
run rm -rf src dest srcdir destdir
|
||||||
|
|
||||||
|
genfile src <<<"file"
|
||||||
|
run mkdir destdir
|
||||||
|
|
||||||
|
copy src destdir
|
||||||
|
if run; then
|
||||||
|
[ -f destdir/src ] || die "destdir/src n'a pas été créé"
|
||||||
|
diff -q src destdir/src || die "src et destdir/src ne sont pas identiques"
|
||||||
|
fi
|
||||||
|
|
||||||
|
AUTOBUILD=
|
|
@ -0,0 +1,13 @@
|
||||||
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
|
|
||||||
|
run rm -rf src dest srcdir destdir
|
||||||
|
|
||||||
|
genfile src <<<"file"
|
||||||
|
|
||||||
|
copy src dest
|
||||||
|
if run; then
|
||||||
|
[ -f dest ] || die "dest n'a pas été créé"
|
||||||
|
diff -q src dest || die "src et dest ne sont pas identiques"
|
||||||
|
fi
|
||||||
|
|
||||||
|
AUTOBUILD=
|
|
@ -0,0 +1,27 @@
|
||||||
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
|
|
||||||
|
run rm -rf src dest srcdir destdir
|
||||||
|
|
||||||
|
run mkdir srcdir
|
||||||
|
genfile srcdir/src <<<"file"
|
||||||
|
run ln -s src srcdir/link
|
||||||
|
|
||||||
|
run mkdir destdir
|
||||||
|
genfile destdir/.gitignore <<<"/a/"
|
||||||
|
|
||||||
|
copy srcdir destdir/a gitignore=destdir
|
||||||
|
copy srcdir destdir/b gitignore=destdir
|
||||||
|
if run; then
|
||||||
|
[ -f destdir/a/src ] || die "destdir/a/src n'a pas été créé"
|
||||||
|
[ -f destdir/b/src ] || die "destdir/b/src n'a pas été créé"
|
||||||
|
[ -L destdir/a/link ] || die "destdir/a/link n'a pas été créé"
|
||||||
|
[ -L destdir/b/link ] || die "destdir/b/link n'a pas été créé"
|
||||||
|
ignored="$(<destdir/.gitignore)"
|
||||||
|
expected="\
|
||||||
|
/a/
|
||||||
|
/b/link
|
||||||
|
/b/src"
|
||||||
|
[ "$ignored" == "$expected" ] || die "les fichiers n'ont pas été ignorés"
|
||||||
|
fi
|
||||||
|
|
||||||
|
AUTOBUILD=
|
|
@ -0,0 +1,16 @@
|
||||||
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
|
|
||||||
|
if machine fast5; then
|
||||||
|
setprofiles prod
|
||||||
|
elif machine fast4; then
|
||||||
|
setprofiles test
|
||||||
|
else
|
||||||
|
setprofiles devel test prod
|
||||||
|
fi
|
||||||
|
|
||||||
|
if run; then
|
||||||
|
echo "PROFILE=$PROFILE"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# pas de build automatique
|
||||||
|
AUTOBUILD=
|
|
@ -0,0 +1,16 @@
|
||||||
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
|
|
||||||
|
section "première section"
|
||||||
|
note "une note"
|
||||||
|
info "une première info"
|
||||||
|
info "une deuxième info"
|
||||||
|
debug "message de debug"
|
||||||
|
|
||||||
|
section "deuxième section"
|
||||||
|
note "une note"
|
||||||
|
info "une première info"
|
||||||
|
info "une deuxième info"
|
||||||
|
debug "message de debug"
|
||||||
|
|
||||||
|
# pas de build automatique
|
||||||
|
AUTOBUILD=
|
|
@ -0,0 +1,8 @@
|
||||||
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
|
setenv IMAGE=dkbuild-tests/tags0
|
||||||
|
|
||||||
|
dockerfile
|
||||||
|
# -*- coding: utf-8 mode: dockerfile -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
|
FROM scratch
|
||||||
|
ENV var=empty
|
||||||
|
build
|
|
@ -0,0 +1,9 @@
|
||||||
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
|
setprofiles v1-prod v2-prod
|
||||||
|
setenv IMAGE=dkbuild-tests/tags1
|
||||||
|
|
||||||
|
dockerfile
|
||||||
|
# -*- coding: utf-8 mode: dockerfile -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
|
FROM scratch
|
||||||
|
ENV var=empty
|
||||||
|
build
|
|
@ -0,0 +1,16 @@
|
||||||
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
|
|
||||||
|
section "variables d'environnement"
|
||||||
|
setenv A="env A"
|
||||||
|
resetenv B="env B"
|
||||||
|
|
||||||
|
info "A=$A, B=$B"
|
||||||
|
if [ "$A" != x ]; then
|
||||||
|
note "\
|
||||||
|
Essayer de relancer avec
|
||||||
|
$(qvals dkbuild -j "$(relpath "$DKBUILD")" -e A=x -e B=y)
|
||||||
|
on ne devrait pas pouvoir modifier la valeur de B"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# pas de build automatique
|
||||||
|
AUTOBUILD=
|
|
@ -1,7 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
source "$(dirname "$0")/lib/ulib/ulib" || exit 1
|
source "$(dirname -- "$0")/lib/ulib/auto" || exit 1
|
||||||
urequire DEFAULTS
|
|
||||||
|
|
||||||
function display_help() {
|
function display_help() {
|
||||||
uecho "$scriptname:
|
uecho "$scriptname:
|
||||||
|
|
|
@ -7,6 +7,7 @@ NAMES=(
|
||||||
package.html:javadoc-package
|
package.html:javadoc-package
|
||||||
)
|
)
|
||||||
EXTS=(
|
EXTS=(
|
||||||
|
lst:empty
|
||||||
txt:text
|
txt:text
|
||||||
conf:conf
|
conf:conf
|
||||||
sql:sql
|
sql:sql
|
||||||
|
@ -50,7 +51,7 @@ TEMPLATES=(
|
||||||
|
|
||||||
# Scripts à utiliser pour générer les templates
|
# Scripts à utiliser pour générer les templates
|
||||||
TEMPLS=(
|
TEMPLS=(
|
||||||
text:text conf:text sql:text sieve:text yaml:text
|
empty:text text:text conf:text sql:text sieve:text yaml:text
|
||||||
markdown:wiki tiddlywiki:wiki
|
markdown:wiki tiddlywiki:wiki
|
||||||
puml:plantuml iuml:plantuml
|
puml:plantuml iuml:plantuml
|
||||||
shell:shell
|
shell:shell
|
||||||
|
|
|
@ -23,9 +23,9 @@ OPTIONS
|
||||||
}
|
}
|
||||||
|
|
||||||
NAME=text
|
NAME=text
|
||||||
TEMPLATES=(text conf sql sieve yaml)
|
TEMPLATES=(empty text conf sql sieve yaml)
|
||||||
NAMES=()
|
NAMES=()
|
||||||
EXTS=(txt conf sql sieve yml yaml)
|
EXTS=(lst txt conf sql sieve yml yaml)
|
||||||
|
|
||||||
if [ $# -eq 2 ]; then
|
if [ $# -eq 2 ]; then
|
||||||
if [ "$1" == "--matches-template" ]; then
|
if [ "$1" == "--matches-template" ]; then
|
||||||
|
@ -58,6 +58,16 @@ function check_overwrite() {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function generate_empty() {
|
||||||
|
local file="$1"
|
||||||
|
|
||||||
|
check_overwrite "$1" || return
|
||||||
|
estep "$(ppath "$file")"
|
||||||
|
touch "$file"
|
||||||
|
[ -n "$2" ] && array_add "$2" "$file"
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
function generate_text() {
|
function generate_text() {
|
||||||
local file="$1"
|
local file="$1"
|
||||||
local mode=text
|
local mode=text
|
||||||
|
@ -150,6 +160,7 @@ for file in "$@"; do
|
||||||
fi
|
fi
|
||||||
|
|
||||||
case "$t" in
|
case "$t" in
|
||||||
|
empty) generate_empty "$file" files2edit || r=$?;;
|
||||||
text|txt|t) generate_text "$file" files2edit || r=$?;;
|
text|txt|t) generate_text "$file" files2edit || r=$?;;
|
||||||
conf|c) generate_conf "$file" files2edit || r=$?;;
|
conf|c) generate_conf "$file" files2edit || r=$?;;
|
||||||
sql) generate_sql "$file" files2edit || r=$?;;
|
sql) generate_sql "$file" files2edit || r=$?;;
|
||||||
|
|
|
@ -42,6 +42,7 @@ done
|
||||||
./ulink --nutools-makelinks
|
./ulink --nutools-makelinks
|
||||||
./doinplace --nutools-makelinks
|
./doinplace --nutools-makelinks
|
||||||
./fndate --nutools-makelinks
|
./fndate --nutools-makelinks
|
||||||
|
./regcp --nutools-makelinks
|
||||||
|
|
||||||
# complétion programmable
|
# complétion programmable
|
||||||
rm -f ~/etc/bashrc.d/bash_completion.nutools # renommé
|
rm -f ~/etc/bashrc.d/bash_completion.nutools # renommé
|
||||||
|
|
|
@ -391,7 +391,7 @@ function get_time_fr() {
|
||||||
}
|
}
|
||||||
function parse_date() {
|
function parse_date() {
|
||||||
local value="$1" type="${2:-date}"
|
local value="$1" type="${2:-date}"
|
||||||
local now="$(awk 'BEGIN { print mktime(strftime("%Y %m %d 00 00 00 +0400")) }')"
|
local now="$(awk 'BEGIN { print mktime(strftime("%Y %m %d 00 00 00")) }')"
|
||||||
case "$value" in
|
case "$value" in
|
||||||
=*) value="${value#=}";;
|
=*) value="${value#=}";;
|
||||||
+*) value="$(($now + ${value#+} * 86400))";;
|
+*) value="$(($now + ${value#+} * 86400))";;
|
||||||
|
@ -402,7 +402,7 @@ function parse_date() {
|
||||||
m = $2 + 0; if (m < 1) m = nm;
|
m = $2 + 0; if (m < 1) m = nm;
|
||||||
if ($3 == "") y = ny;
|
if ($3 == "") y = ny;
|
||||||
else { y = $3 + 0; if (y < 100) y = y + 2000; }
|
else { y = $3 + 0; if (y < 100) y = y + 2000; }
|
||||||
print mktime(sprintf("%04i %02i %02i 00 00 00 +0400", y, m, d));
|
print mktime(sprintf("%04i %02i %02i 00 00 00", y, m, d));
|
||||||
}')";;
|
}')";;
|
||||||
esac
|
esac
|
||||||
case "$type" in
|
case "$type" in
|
||||||
|
@ -1424,6 +1424,7 @@ function is_archive() {
|
||||||
name="${name%.jar}"
|
name="${name%.jar}"
|
||||||
name="${name%.war}"
|
name="${name%.war}"
|
||||||
name="${name%.ear}"
|
name="${name%.ear}"
|
||||||
|
[ "$NUTOOLS_SH_ARCHIVE_SUPPORT" ] && name="${name%.sh}"
|
||||||
[ "$name" != "$1" ]
|
[ "$name" != "$1" ]
|
||||||
}
|
}
|
||||||
function extract_archive() {
|
function extract_archive() {
|
||||||
|
@ -1445,6 +1446,12 @@ function extract_archive() {
|
||||||
cd "$destdir"
|
cd "$destdir"
|
||||||
jar xf "$arch" "$@"
|
jar xf "$arch" "$@"
|
||||||
) || return
|
) || return
|
||||||
|
elif [ "$NUTOOLS_SH_ARCHIVE_SUPPORT" ] && endswith "$arch" .sh; then
|
||||||
|
(
|
||||||
|
arch="$(abspath "$arch")"
|
||||||
|
cd "$destdir"
|
||||||
|
"${BASH:-/bin/sh}" "$arch" --tar xf "$@"
|
||||||
|
) || return
|
||||||
else
|
else
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
@ -1462,6 +1469,7 @@ function get_archive_basename() {
|
||||||
basename="${basename%.jar}"
|
basename="${basename%.jar}"
|
||||||
basename="${basename%.war}"
|
basename="${basename%.war}"
|
||||||
basename="${basename%.ear}"
|
basename="${basename%.ear}"
|
||||||
|
[ "$NUTOOLS_SH_ARCHIVE_SUPPORT" ] && basename="${basename%.sh}"
|
||||||
# résultat
|
# résultat
|
||||||
echo "$basename"
|
echo "$basename"
|
||||||
}
|
}
|
||||||
|
@ -1481,6 +1489,7 @@ function get_archive_appname() {
|
||||||
appname="${appname%.jar}"
|
appname="${appname%.jar}"
|
||||||
appname="${appname%.war}"
|
appname="${appname%.war}"
|
||||||
appname="${appname%.ear}"
|
appname="${appname%.ear}"
|
||||||
|
[ "$NUTOOLS_SH_ARCHIVE_SUPPORT" ] && appname="${appname%.sh}"
|
||||||
# supprimer la version et afficher
|
# supprimer la version et afficher
|
||||||
echo "$appname" | awk '{
|
echo "$appname" | awk '{
|
||||||
if (match($0, /[-_.]([0-9]+([-_.][0-9]+)*([a-zA-Z][0-9]*|[-_.][0-9]+[a-zA-Z][0-9]*)?)$/)) {
|
if (match($0, /[-_.]([0-9]+([-_.][0-9]+)*([a-zA-Z][0-9]*|[-_.][0-9]+[a-zA-Z][0-9]*)?)$/)) {
|
||||||
|
|
10
lib/ulib/vcs
10
lib/ulib/vcs
|
@ -617,23 +617,23 @@ function git_push() {
|
||||||
if [ -n "$all" ]; then
|
if [ -n "$all" ]; then
|
||||||
# On a demandé à pusher toutes les branches et tous les tags
|
# On a demandé à pusher toutes les branches et tous les tags
|
||||||
local r
|
local r
|
||||||
git push --all "$@"; r=$?
|
git push --all ${force:+--force} "$@"; r=$?
|
||||||
if [ $r -eq 0 ]; then
|
if [ $r -eq 0 ]; then
|
||||||
git push --tags "$@"; r=$?
|
git push --tags ${force:+--force} "$@"; r=$?
|
||||||
fi
|
fi
|
||||||
return $r
|
return $r
|
||||||
elif [ -n "$all_branches" ]; then
|
elif [ -n "$all_branches" ]; then
|
||||||
# On a demandé à pusher toutes les branches
|
# On a demandé à pusher toutes les branches
|
||||||
git push --all "$@"
|
git push --all ${force:+--force} "$@"
|
||||||
return $?
|
return $?
|
||||||
elif [ -n "$all_tags" ]; then
|
elif [ -n "$all_tags" ]; then
|
||||||
# On a demandé à pusher tous les tags
|
# On a demandé à pusher tous les tags
|
||||||
git push --tags "$@"
|
git push --tags ${force:+--force} "$@"
|
||||||
return $?
|
return $?
|
||||||
elif [ $# -gt 0 ]; then
|
elif [ $# -gt 0 ]; then
|
||||||
# Sinon, si des arguments sont spécifiés, les passer à git sans
|
# Sinon, si des arguments sont spécifiés, les passer à git sans
|
||||||
# modification
|
# modification
|
||||||
git push "$@"
|
git push ${force:+--force} "$@"
|
||||||
return $?
|
return $?
|
||||||
elif git_have_annex; then
|
elif git_have_annex; then
|
||||||
# Si une annexe existe dans le dépôt, demander à git-annex de faire la
|
# Si une annexe existe dans le dépôt, demander à git-annex de faire la
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
source "$(dirname "$0")/lib/ulib/ulib" || exit 1
|
source "$(dirname -- "$0")/lib/ulib/auto" || exit 1
|
||||||
urequire DEFAULTS apache.tools
|
urequire apache.tools
|
||||||
|
|
||||||
function display_help() {
|
function display_help() {
|
||||||
uecho "$scriptname: Créer un fichier de redirections pour Apache à partir d'un certain
|
uecho "$scriptname: Créer un fichier de redirections pour Apache à partir d'un certain
|
||||||
|
|
3
mkiso
3
mkiso
|
@ -1,7 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
source "$(dirname "$0")/lib/ulib/ulib" || exit 1
|
source "$(dirname -- "$0")/lib/ulib/auto" || exit 1
|
||||||
urequire DEFAULTS
|
|
||||||
|
|
||||||
function display_help() {
|
function display_help() {
|
||||||
uecho "$scriptname: créer une image iso d'un répertoire
|
uecho "$scriptname: créer une image iso d'un répertoire
|
||||||
|
|
3
mkurl
3
mkurl
|
@ -1,7 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
source "$(dirname "$0")/lib/ulib/ulib" || exit 1
|
source "$(dirname -- "$0")/lib/ulib/auto" || exit 1
|
||||||
urequire DEFAULTS
|
|
||||||
|
|
||||||
function display_help() {
|
function display_help() {
|
||||||
uecho "$scriptname: Enregistrer une url dans un fichier raccourci
|
uecho "$scriptname: Enregistrer une url dans un fichier raccourci
|
||||||
|
|
3
mkusfx
3
mkusfx
|
@ -1,7 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
source "$(dirname "$0")/lib/ulib/ulib" || exit 1
|
source "$(dirname -- "$0")/lib/ulib/auto" || exit 1
|
||||||
urequire DEFAULTS
|
|
||||||
|
|
||||||
function display_help() {
|
function display_help() {
|
||||||
uecho "$scriptname: Créer une archive auto-extractible qui installe son contenu avec uinst
|
uecho "$scriptname: Créer une archive auto-extractible qui installe son contenu avec uinst
|
||||||
|
|
3
mocifs
3
mocifs
|
@ -1,7 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
source "$(dirname "$0")/lib/ulib/ulib" || exit 1
|
source "$(dirname -- "$0")/lib/ulib/auto" || exit 1
|
||||||
urequire DEFAULTS
|
|
||||||
|
|
||||||
function display_help() {
|
function display_help() {
|
||||||
uecho "$scriptname: Monter un partage Windows/Samba/CIFS
|
uecho "$scriptname: Monter un partage Windows/Samba/CIFS
|
||||||
|
|
3
modav
3
modav
|
@ -1,7 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
source "$(dirname "$0")/lib/ulib/ulib" || exit 1
|
source "$(dirname -- "$0")/lib/ulib/auto" || exit 1
|
||||||
urequire DEFAULTS
|
|
||||||
|
|
||||||
function display_help() {
|
function display_help() {
|
||||||
uecho "$scriptname: Monter un répertoire sur un hôte distant avec davfs
|
uecho "$scriptname: Monter un répertoire sur un hôte distant avec davfs
|
||||||
|
|
3
moiso
3
moiso
|
@ -1,7 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
source "$(dirname "$0")/lib/ulib/ulib" || exit 1
|
source "$(dirname -- "$0")/lib/ulib/auto" || exit 1
|
||||||
urequire DEFAULTS
|
|
||||||
|
|
||||||
function display_help() {
|
function display_help() {
|
||||||
uecho "$scriptname: Monter une image ISO
|
uecho "$scriptname: Monter une image ISO
|
||||||
|
|
3
mossh
3
mossh
|
@ -1,7 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
source "$(dirname "$0")/lib/ulib/ulib" || exit 1
|
source "$(dirname -- "$0")/lib/ulib/auto" || exit 1
|
||||||
urequire DEFAULTS
|
|
||||||
|
|
||||||
function display_help() {
|
function display_help() {
|
||||||
uecho "$scriptname: Monter un répertoire sur un hôte distant avec sshfs
|
uecho "$scriptname: Monter un répertoire sur un hôte distant avec sshfs
|
||||||
|
|
4
mssh
4
mssh
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
source "$(dirname "$0")/lib/ulib/ulib"
|
source "$(dirname -- "$0")/lib/ulib/auto" || exit 1
|
||||||
urequire DEFAULTS ipcalc
|
urequire ipcalc
|
||||||
|
|
||||||
if [ $# -eq 1 -a "$1" == "--help" ]; then
|
if [ $# -eq 1 -a "$1" == "--help" ]; then
|
||||||
exit_with uecho "$scriptname: Faire une connexion ssh en utilisant l'exécutable approprié au réseau source et destination
|
exit_with uecho "$scriptname: Faire une connexion ssh en utilisant l'exécutable approprié au réseau source et destination
|
||||||
|
|
3
mysqlcsv
3
mysqlcsv
|
@ -1,7 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
source "$(dirname "$0")/lib/ulib/ulib" || exit 1
|
source "$(dirname -- "$0")/lib/ulib/auto" || exit 1
|
||||||
urequire DEFAULTS
|
|
||||||
|
|
||||||
function display_help() {
|
function display_help() {
|
||||||
uecho "$scriptname: Faire une requête MySQL et formater la sortie pour traitement avec awkcsv
|
uecho "$scriptname: Faire une requête MySQL et formater la sortie pour traitement avec awkcsv
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
source "$(dirname "$0")/lib/ulib/ulib" || exit 1
|
source "$(dirname -- "$0")/lib/ulib/auto" || exit 1
|
||||||
urequire DEFAULTS awk
|
urequire awk
|
||||||
|
|
||||||
function display_help() {
|
function display_help() {
|
||||||
uecho "$scriptname: Charger une table MySQL avec un fichier csv
|
uecho "$scriptname: Charger une table MySQL avec un fichier csv
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
source "$(dirname "$0")/lib/ulib/ulib" || exit 1
|
source "$(dirname -- "$0")/lib/ulib/auto" || exit 1
|
||||||
urequire DEFAULTS debian
|
urequire debian
|
||||||
|
|
||||||
function display_help() {
|
function display_help() {
|
||||||
uecho "$scriptname: gérer la configuration du réseau
|
uecho "$scriptname: gérer la configuration du réseau
|
||||||
|
|
3
nutools
3
nutools
|
@ -1,7 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
source "$(dirname "$0")/lib/ulib/ulib" || exit 1
|
source "$(dirname -- "$0")/lib/ulib/auto" || exit 1
|
||||||
urequire DEFAULTS
|
|
||||||
|
|
||||||
function display_help() {
|
function display_help() {
|
||||||
uecho "$scriptname: configurer ou afficher des informations sur nutools
|
uecho "$scriptname: configurer ou afficher des informations sur nutools
|
||||||
|
|
3
openurl
3
openurl
|
@ -1,7 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
source "$(dirname "$0")/lib/ulib/ulib" || exit 1
|
source "$(dirname -- "$0")/lib/ulib/auto" || exit 1
|
||||||
urequire DEFAULTS
|
|
||||||
|
|
||||||
# faut-il supprimer la sortie erreur? les warnings de GTK sont horripilants.
|
# faut-il supprimer la sortie erreur? les warnings de GTK sont horripilants.
|
||||||
: "${OPENURL_STDERR:=}"
|
: "${OPENURL_STDERR:=}"
|
||||||
|
|
4
pdev
4
pdev
|
@ -13,8 +13,8 @@ complete -F __pdev_completion pdev
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
source "$(dirname "$0")/lib/ulib/ulib" || exit 1
|
source "$(dirname -- "$0")/lib/ulib/auto" || exit 1
|
||||||
urequire DEFAULTS ptools
|
urequire ptools
|
||||||
|
|
||||||
function display_help() {
|
function display_help() {
|
||||||
uecho "$scriptname: basculer sur une branche de développement
|
uecho "$scriptname: basculer sur une branche de développement
|
||||||
|
|
46
pff
46
pff
|
@ -16,6 +16,7 @@ ORIGEXT=pff
|
||||||
DEFAULT_ORIGEXTS=(".$ORIGEXT" .origine .default)
|
DEFAULT_ORIGEXTS=(".$ORIGEXT" .origine .default)
|
||||||
PFFCONF=.pff.conf # ne pas modifier
|
PFFCONF=.pff.conf # ne pas modifier
|
||||||
DEFAULT_PROTECTS=(/.git/ .svn/ /pff/ "/$PFFCONF")
|
DEFAULT_PROTECTS=(/.git/ .svn/ /pff/ "/$PFFCONF")
|
||||||
|
NUTOOLS_SH_ARCHIVE_SUPPORT=1
|
||||||
|
|
||||||
PFFCONFVARS=(
|
PFFCONFVARS=(
|
||||||
"VERSION//Version actuellement installée"
|
"VERSION//Version actuellement installée"
|
||||||
|
@ -118,8 +119,8 @@ complete -F __pff_completion -o bashdefault -o default pff
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
source "$(dirname "$0")/lib/ulib/ulib" || exit 1
|
source "$(dirname -- "$0")/lib/ulib/auto" || exit 1
|
||||||
urequire DEFAULTS multiconf vcs javaproperties
|
urequire multiconf vcs javaproperties
|
||||||
|
|
||||||
function display_help() {
|
function display_help() {
|
||||||
uecho "$scriptname: gestion de modifications locales
|
uecho "$scriptname: gestion de modifications locales
|
||||||
|
@ -269,6 +270,10 @@ supportées sont:
|
||||||
s'il veut faire commit & push dans git (--ask-commit, la valeur par
|
s'il veut faire commit & push dans git (--ask-commit, la valeur par
|
||||||
défaut), le faire sans confirmation (--commit), ou ne jamais le faire
|
défaut), le faire sans confirmation (--commit), ou ne jamais le faire
|
||||||
(--no-commit)
|
(--no-commit)
|
||||||
|
--no-push
|
||||||
|
Ne pas faire de push après un commit. On peut aussi lancer la commande
|
||||||
|
suivante avant pff:
|
||||||
|
export UTOOLS_VCS_OFFLINE=1
|
||||||
|
|
||||||
-b, --add-global FILES...
|
-b, --add-global FILES...
|
||||||
Ajouter/Identifier un fichier comme un fichier local pour tous les
|
Ajouter/Identifier un fichier comme un fichier local pour tous les
|
||||||
|
@ -619,7 +624,7 @@ function autoinit() {
|
||||||
# Lancer les commandes AUTO_CMDS
|
# Lancer les commandes AUTO_CMDS
|
||||||
local cwd cmd
|
local cwd cmd
|
||||||
if [ ${#AUTO_CMDS[*]} -gt 0 ]; then
|
if [ ${#AUTO_CMDS[*]} -gt 0 ]; then
|
||||||
eetitle "AutoCmds"
|
etitle "AutoCmds"
|
||||||
cwd="$(pwd)"
|
cwd="$(pwd)"
|
||||||
cd "$pffdir"
|
cd "$pffdir"
|
||||||
for cmd in "${AUTO_CMDS[@]}"; do
|
for cmd in "${AUTO_CMDS[@]}"; do
|
||||||
|
@ -807,15 +812,22 @@ function new__prepare_archive() {
|
||||||
enote "Auto-sélection du type distribution de patch sur la base de l'extension .zip"
|
enote "Auto-sélection du type distribution de patch sur la base de l'extension .zip"
|
||||||
DISTTYPE=patch
|
DISTTYPE=patch
|
||||||
;;
|
;;
|
||||||
|
*.sh)
|
||||||
|
die "Ce type d'archive ne contient pas l'information du type de distribution. Vous devez spécifier l'une des options -F ou -H"
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
die "L'extension de l'archive n'est pas reconnue. Vous devez spécifier l'une des options -F ou -H"
|
die "L'extension de l'archive n'est pas reconnue. Vous devez spécifier l'une des options -F ou -H"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
local -a tmpargs
|
||||||
|
case "$archive" in
|
||||||
|
*.sh) tmpargs=(--exclude cleanup.sh --exclude install.sh);;
|
||||||
|
esac
|
||||||
|
|
||||||
ac_set_tmpdir tmpd
|
ac_set_tmpdir tmpd
|
||||||
estep "Extraction de $(ppath "$archive" "$cwd")"
|
estep "Extraction de $(ppath "$archive" "$cwd")"
|
||||||
extract_archive "$archive" "$tmpd" || die
|
extract_archive "$archive" "$tmpd" "${tmpargs[@]}" || die
|
||||||
srcdir="$tmpd"
|
srcdir="$tmpd"
|
||||||
|
|
||||||
if [ -n "$unwrap" ]; then
|
if [ -n "$unwrap" ]; then
|
||||||
|
@ -859,22 +871,21 @@ function new__prepare_archive() {
|
||||||
local "$destver"; upvar "$destver" "$version"
|
local "$destver"; upvar "$destver" "$version"
|
||||||
}
|
}
|
||||||
|
|
||||||
function new_cmd_amue_clean_libs() {
|
function new_cmd_amue_clean() {
|
||||||
# en mode distribution "patch", supprimer le contenu du répertoire
|
# en mode distribution "patch", supprimer le contenu des répertoires
|
||||||
# WEB-INF/lib si ces fichiers sont relivrés
|
# spécifiés s'ils sont relivrés
|
||||||
[ "$DISTTYPE" == patch ] || return
|
[ "$DISTTYPE" == patch ] || return
|
||||||
if [ -n "$(/bin/ls -d "$srcdir/WEB-INF/lib"/* 2>/dev/null)" ]; then
|
[ $# -gt 0 ] || set -- WEB-INF/{lib,classes/{gouv,com,org}} wsdl
|
||||||
rm -f WEB-INF/lib/*
|
local dir
|
||||||
fi
|
for dir in "$@"; do
|
||||||
}
|
if [ -n "$(/bin/ls -d "$srcdir/$dir"/* 2>/dev/null)" ]; then
|
||||||
function new_cmd_amue_clean_wsdl() {
|
eval "rm -rf $dir/*"
|
||||||
# en mode distribution "patch", supprimer le contenu du répertoire
|
|
||||||
# WEB-INF/wsdl si ces fichiers sont relivrés
|
|
||||||
[ "$DISTTYPE" == patch ] || return
|
|
||||||
if [ -n "$(/bin/ls -d "$srcdir/WEB-INF/wsdl"/* 2>/dev/null)" ]; then
|
|
||||||
rm -f WEB-INF/wsdl/*
|
|
||||||
fi
|
fi
|
||||||
|
done
|
||||||
}
|
}
|
||||||
|
# compat
|
||||||
|
function new_cmd_amue_clean_libs() { new_cmd_amue_clean WEB-INF/lib; }
|
||||||
|
function new_cmd_amue_clean_wsdl() { new_cmd_amue_clean wsdl; }
|
||||||
|
|
||||||
function new_cmd() {
|
function new_cmd() {
|
||||||
local autopatch="$1" version="$2" disttype="$3" unwrap="$4" merge_strategy="$5" commit_policy="$6"; shift; shift; shift; shift; shift; shift
|
local autopatch="$1" version="$2" disttype="$3" unwrap="$4" merge_strategy="$5" commit_policy="$6"; shift; shift; shift; shift; shift; shift
|
||||||
|
@ -1805,6 +1816,7 @@ args=($parse_mode
|
||||||
--ask-commit commit_policy=ask
|
--ask-commit commit_policy=ask
|
||||||
-c,--comit commit_policy=1
|
-c,--comit commit_policy=1
|
||||||
--no-commit commit_policy=
|
--no-commit commit_policy=
|
||||||
|
--no-push UTOOLS_VCS_OFFLINE=1
|
||||||
-b,--add-global action=add-global
|
-b,--add-global action=add-global
|
||||||
--locals action=list-locals
|
--locals action=list-locals
|
||||||
--profiles action=list-profiles
|
--profiles action=list-profiles
|
||||||
|
|
4
prel
4
prel
|
@ -13,8 +13,8 @@ complete -F __prel_completion prel
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
source "$(dirname "$0")/lib/ulib/ulib" || exit 1
|
source "$(dirname -- "$0")/lib/ulib/auto" || exit 1
|
||||||
urequire DEFAULTS ptools
|
urequire ptools
|
||||||
|
|
||||||
# XXX Ajouter une option pour fusionner les modifications d'une branche de
|
# XXX Ajouter une option pour fusionner les modifications d'une branche de
|
||||||
# pré-release dans develop
|
# pré-release dans develop
|
||||||
|
|
4
pver
4
pver
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
source "$(dirname "$0")/lib/ulib/ulib" || exit 1
|
source "$(dirname -- "$0")/lib/ulib/auto" || exit 1
|
||||||
urequire DEFAULTS ptools xmlsupport
|
urequire ptools xmlsupport
|
||||||
|
|
||||||
function pver_display_help() {
|
function pver_display_help() {
|
||||||
uecho "$scriptname: gérer des numéros de version selon les règles du versionage sémantique v2.0.0 (http://semver.org/)
|
uecho "$scriptname: gérer des numéros de version selon les règles du versionage sémantique v2.0.0 (http://semver.org/)
|
||||||
|
|
4
pz
4
pz
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
source "$(dirname "$0")/lib/ulib/ulib" || exit 1
|
source "$(dirname -- "$0")/lib/ulib/auto" || exit 1
|
||||||
urequire DEFAULTS vcs ptools
|
urequire vcs ptools
|
||||||
|
|
||||||
function display_help() {
|
function display_help() {
|
||||||
uecho "$scriptname: faire une archive du projet
|
uecho "$scriptname: faire une archive du projet
|
||||||
|
|
|
@ -0,0 +1,59 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
|
ALIASES=(regmv)
|
||||||
|
if [ "$#" -eq 1 -a "$1" == --nutools-makelinks ]; then
|
||||||
|
# créer les liens
|
||||||
|
scriptname="$(basename "$0")"
|
||||||
|
for alias in "${ALIASES[@]}"; do
|
||||||
|
ln -s "$scriptname" "$alias"
|
||||||
|
done
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
source "$(dirname -- "$0")/lib/ulib/auto" || exit 1
|
||||||
|
|
||||||
|
case "$scriptname" in
|
||||||
|
regcp)
|
||||||
|
VERB="copier"
|
||||||
|
CMD=cp
|
||||||
|
;;
|
||||||
|
regmv)
|
||||||
|
VERB="déplacer"
|
||||||
|
CMD=mv
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
function display_help() {
|
||||||
|
uecho "$scriptname: $VERB un fichier vers une destination construite avec une expressions régulière
|
||||||
|
|
||||||
|
USAGE
|
||||||
|
$scriptname REGEXP FILEs....
|
||||||
|
|
||||||
|
NB: l'expression régulière est traitée avec sed, e.g s/FROM/TO/
|
||||||
|
|
||||||
|
OPTIONS
|
||||||
|
-n, --fake
|
||||||
|
Ne pas $VERB, afficher simplement ce qui serait fait"
|
||||||
|
}
|
||||||
|
|
||||||
|
fake=
|
||||||
|
args=(
|
||||||
|
--help '$exit_with display_help'
|
||||||
|
-n,--fake fake=1
|
||||||
|
)
|
||||||
|
parse_args "$@"; set -- "${args[@]}"
|
||||||
|
|
||||||
|
regexp="$1"; shift
|
||||||
|
[ -n "$regexp" ] || die "l'expression régulière est requise"
|
||||||
|
|
||||||
|
for src in "$@"; do
|
||||||
|
dest="$(sed "$regexp" <<<"$src")"
|
||||||
|
if [ "$src" == "$dest" ]; then
|
||||||
|
eerror "$src: refus de $VERB le fichier sur lui-même"
|
||||||
|
else
|
||||||
|
estep "$src --> $dest"
|
||||||
|
if [ -z "$fake" ]; then
|
||||||
|
"$CMD" "$src" "$dest" || die
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
6
repoctl
6
repoctl
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
source "$(dirname "$0")/lib/ulib/ulib" || exit 1
|
source "$(dirname -- "$0")/lib/ulib/auto" || exit 1
|
||||||
urequire DEFAULTS json
|
urequire json
|
||||||
|
|
||||||
function display_help() {
|
function display_help() {
|
||||||
uecho "$scriptname: piloter un serveur git (gitolite, gogs, gitea, etc.)
|
uecho "$scriptname: piloter un serveur git (gitolite, gogs, gitea, etc.)
|
||||||
|
@ -47,7 +47,7 @@ ACTIONS
|
||||||
}
|
}
|
||||||
|
|
||||||
function repoctl_init() {
|
function repoctl_init() {
|
||||||
repourl="${1%.git}"
|
repourl="$1"
|
||||||
[ -n "$repourl" ] || return
|
[ -n "$repourl" ] || return
|
||||||
rname=
|
rname=
|
||||||
rtype=gitolite
|
rtype=gitolite
|
||||||
|
|
4
rruns
4
rruns
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
source "$(dirname "$0")/lib/ulib/ulib" || exit 1
|
source "$(dirname -- "$0")/lib/ulib/auto" || exit 1
|
||||||
urequire DEFAULTS runs runsmod
|
urequire runs runsmod
|
||||||
|
|
||||||
function display_help() {
|
function display_help() {
|
||||||
uecho "$scriptname: Déploiement distant avec runs
|
uecho "$scriptname: Déploiement distant avec runs
|
||||||
|
|
4
rtoinst
4
rtoinst
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
source "$(dirname "$0")/lib/ulib/ulib" || exit 1
|
source "$(dirname -- "$0")/lib/ulib/auto" || exit 1
|
||||||
urequire DEFAULTS pyulib/pyulib
|
urequire pyulib/pyulib
|
||||||
|
|
||||||
function display_help() {
|
function display_help() {
|
||||||
uecho "$scriptname: Déploiement distant avec toinst
|
uecho "$scriptname: Déploiement distant avec toinst
|
||||||
|
|
4
ruinst
4
ruinst
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
source "$(dirname "$0")/lib/ulib/ulib" || exit 1
|
source "$(dirname -- "$0")/lib/ulib/auto" || exit 1
|
||||||
urequire DEFAULTS pyulib/pyulib
|
urequire pyulib/pyulib
|
||||||
|
|
||||||
function display_help() {
|
function display_help() {
|
||||||
uecho "$scriptname: Déploiement distant avec uinst
|
uecho "$scriptname: Déploiement distant avec uinst
|
||||||
|
|
4
runs
4
runs
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
source "$(dirname "$0")/lib/ulib/ulib" || exit 1
|
source "$(dirname -- "$0")/lib/ulib/auto" || exit 1
|
||||||
urequire DEFAULTS runs runsmod
|
urequire runs runsmod
|
||||||
|
|
||||||
function display_help() {
|
function display_help() {
|
||||||
uecho "$scriptname: Lancer un script avec le protocole runs
|
uecho "$scriptname: Lancer un script avec le protocole runs
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
source "$(dirname "$0")/lib/ulib/ulib" || exit 1
|
source "$(dirname -- "$0")/lib/ulib/auto" || exit 1
|
||||||
urequire DEFAULTS template runs
|
urequire template runs
|
||||||
|
|
||||||
function display_help() {
|
function display_help() {
|
||||||
uecho "$scriptname: Gérer un répertoire d'hôte de runs
|
uecho "$scriptname: Gérer un répertoire d'hôte de runs
|
||||||
|
|
4
runsmod
4
runsmod
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
source "$(dirname "$0")/lib/ulib/ulib" || exit 1
|
source "$(dirname -- "$0")/lib/ulib/auto" || exit 1
|
||||||
urequire DEFAULTS runsmod
|
urequire runsmod
|
||||||
|
|
||||||
function display_help() {
|
function display_help() {
|
||||||
uecho "$scriptname: récupérer des dépôts git à usage de runs
|
uecho "$scriptname: récupérer des dépôts git à usage de runs
|
||||||
|
|
4
rwoinst
4
rwoinst
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
|
||||||
source "$(dirname -- "$0")/lib/ulib/ulib" || exit 1
|
source "$(dirname -- "$0")/lib/ulib/auto" || exit 1
|
||||||
urequire DEFAULTS woinst
|
urequire woinst
|
||||||
|
|
||||||
function display_help() {
|
function display_help() {
|
||||||
uecho "$scriptname: Déploiement distant avec woinst
|
uecho "$scriptname: Déploiement distant avec woinst
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue