From d021c97ede4681d1af363af63c609d70909c872b Mon Sep 17 00:00:00 2001 From: Jephte CLAIN Date: Thu, 7 Apr 2016 14:57:20 +0400 Subject: [PATCH 1/3] support de on_debian() avec des arguments --- lib/ulib/sysinfos | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/lib/ulib/sysinfos b/lib/ulib/sysinfos index 99cd0ea..8a08f9c 100644 --- a/lib/ulib/sysinfos +++ b/lib/ulib/sysinfos @@ -483,10 +483,10 @@ function check_sysinfos() { # fonctions de support pour tester certaines versions de debian # utilisation: # on_debian -# if on_jessie; then -# elif on_wheezy; then -# elif on_squeeze; then -# else +# if on_jessie; then xxx +# elif on_wheezy; then yyy +# elif on_squeeze; then zzz +# else ttt # fi # OU: # on_debian: @@ -494,14 +494,26 @@ function check_sysinfos() { # on_wheezy yyy # on_squeeze zzz # on_default ttt -# Sans arguments, on_{jessie,wheezy,squeeze} teste si on sur la version demandée -# OU SUPERIEURE. Avec un argument, la version EXACTE est testée, et la commande -# est lancée en cas de correspondance +# Sans arguments, on_{jessie,wheezy,squeeze} testent si on est sur la version +# demandée OU SUPERIEURE. Avec un argument, la version EXACTE est testée, et la +# commande est lancée en cas de correspondance +# la forme 'on_debian CMD' est supporté aussi et permet de lancer CMD si on est +# sur debian, e.g.: +# on_debian pkg_check_install dot graphviz +# on_default ewarn "Il faut installer graphviz manuellement" function on_debian() { + # Tester si on est sur debian. charger le module debian si c'est le cas. + # Si une commande $1..@ est spécifiée, la lancer, mais il n'est alors plus + # possible de lancer des tests plus spécifiques avec __on_debian() NUTOOLS_ON_DEBIAN= if check_sysinfos -d debian; then urequire debian - NUTOOLS_ON_DEBIAN=1 + if [ $# -gt 0 ]; then + NUTOOLS_ON_DEBIAN=debian + "$@" + else + NUTOOLS_ON_DEBIAN=1 + fi return 0 else return 1 From 66f39c7adb2a3e7183d8432e6259a6c9c7bee912 Mon Sep 17 00:00:00 2001 From: Jephte CLAIN Date: Thu, 7 Apr 2016 14:57:46 +0400 Subject: [PATCH 2/3] Init changelog & version 4.3.0 --- CHANGES.txt | 4 ++++ VERSION.txt | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 69426d4..65234a0 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,7 @@ +## Version 4.3.0 du 07/04/2016-14:57 + +d021c97 support de on_debian() avec des arguments + ## Version 4.2.0 du 06/04/2016-14:25 a710c5a Intégration de la branche stdout diff --git a/VERSION.txt b/VERSION.txt index 6aba2b2..8089590 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -4.2.0 +4.3.0 From 9068873219ce1fed841893cb193979e8a7a5a167 Mon Sep 17 00:00:00 2001 From: Jephte CLAIN Date: Thu, 7 Apr 2016 14:58:02 +0400 Subject: [PATCH 3/3] maj ulib --- lib/ulib/.ulibver | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ulib/.ulibver b/lib/ulib/.ulibver index 79e5135..be615a5 100644 --- a/lib/ulib/.ulibver +++ b/lib/ulib/.ulibver @@ -1 +1 @@ -012001000 +012002000