From ee800916505094ae2b17e6e06eb1420290cf7aea Mon Sep 17 00:00:00 2001 From: Jephte Clain Date: Wed, 14 Jun 2023 15:56:04 +0400 Subject: [PATCH 1/4] cosmetic --- update-nutools | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/update-nutools b/update-nutools index 233eb9e..46bb88d 100755 --- a/update-nutools +++ b/update-nutools @@ -80,20 +80,20 @@ WARN: impossible de déterminer la source pour la mise à jour. sélection de l'adresse publique $PUB_REPO" echo "\ NOTE: si une erreur se produit, utiliser l'adresse privée, e.g. - NUTOOLS_REPO=$PRIV_REPO $0" + NUTOOLS_REPO=$PRIV_REPO $0" fi scriptdir="$1" -clonerepo= +tmpclone= if [ -z "$NUTOOLS_REPO" -a -f "$scriptdir/.nutools-devel" -a -d "$scriptdir/.git" ]; then echo "NOTE: tentative de mise à jour du dépôt local" cd "$scriptdir" - git pull || clonerepo=1 + git pull || tmpclone=1 else - clonerepo=1 + tmpclone=1 fi -if [ -n "$clonerepo" ]; then +if [ -n "$tmpclone" ]; then echo "NOTE: clonage du dépôt distant $REPO" cd /tmp rm -rf "$NAME" @@ -103,13 +103,14 @@ fi if ! diff -q "$SCRIPTNAME" "$0"; then echo "NOTE: Le script $SCRIPTNAME a été mis à jour. Il va être relancé." - exec bash "./$SCRIPTNAME" ${develop:+--develop} + exec bash "./$SCRIPTNAME" ${develop:+--develop} ${public:+--public} fi -bash ./uinst -y || exit 1 -if [ -n "$clonerepo" ]; then +bash ./uinst -y || exit 1 +if [ -n "$tmpclone" ]; then cd .. rm -rf "$NAME" fi + # IMPORTANT: la ligne suivante ne doit pas se terminer par un retour à la ligne: rm "$0"; exit 0 \ No newline at end of file From 63674ef02b98c41d5fce7270e219b7f02aade9a1 Mon Sep 17 00:00:00 2001 From: Jephte Clain Date: Wed, 14 Jun 2023 16:03:03 +0400 Subject: [PATCH 2/4] cosmetic --- update-nutools | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/update-nutools b/update-nutools index 46bb88d..e3fd17e 100755 --- a/update-nutools +++ b/update-nutools @@ -5,6 +5,7 @@ SCRIPTNAME=update-nutools TMPSCRIPT="/tmp/$SCRIPTNAME" PRIV_REPO=http://vs-git.univ.run/modules/nutools PUB_REPO=https://git.univ-reunion.fr/modules/nutools +REPO_SUFFIX=modules/nutools NAME=nutools ################################################################################ @@ -62,13 +63,13 @@ WGET="$(which wget 2>/dev/null)" if [ -n "$NUTOOLS_REPO" ]; then REPO="$NUTOOLS_REPO" elif [ -n "$CURL" ]; then - if curl -fs -m 3 "$PUB_REPO" >&/dev/null; then + if curl -fs -m 3 "${PUB_REPO%$REPO_SUFFIX}" >&/dev/null; then REPO="$PUB_REPO" else REPO="$PRIV_REPO" fi elif [ -n "$WGET" ]; then - if wget -q --timeout=3 -O - "$PUB_REPO" >&/dev/null; then + if wget -q --timeout=3 -O - "${PUB_REPO%$REPO_SUFFIX}" >&/dev/null; then REPO="$PUB_REPO" else REPO="$PRIV_REPO" From f36be0dfb24e3528da97bf09660d455e16191919 Mon Sep 17 00:00:00 2001 From: Jephte Clain Date: Thu, 15 Jun 2023 15:28:15 +0400 Subject: [PATCH 3/4] =?UTF-8?q?uscrontab:=20s'assurer=20que=20USER=20est?= =?UTF-8?q?=20d=C3=A9fini?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- uscrontab | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/uscrontab b/uscrontab index daac27a..ade4890 100755 --- a/uscrontab +++ b/uscrontab @@ -358,6 +358,10 @@ function check_pause() { return 1 } +# $USER est requis +[ -n "$LOGNAME" ] || export LOGNAME="$(id -un)" +[ -n "$USER" ] || export USER="$LOGNAME" + USCRONTAB_CTLINE="* * * * * $script" USCRONTAB_LOCKDELAY=8 USCRONTAB_STOPEC=101 From 61dc4c1154c4bfa938bd2ae3eb8fa79fba875b5e Mon Sep 17 00:00:00 2001 From: Jephte Clain Date: Thu, 15 Jun 2023 15:28:28 +0400 Subject: [PATCH 4/4] Init changelog & version 9.16.0 --- CHANGES.md | 6 ++++++ VERSION.txt | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index b7d4de2..1e7cc8b 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,9 @@ +## Version 9.16.0 du 15/06/2023-15:28 + +* `f36be0d` uscrontab: s'assurer que USER est défini +* `63674ef` cosmetic +* `ee80091` cosmetic + ## Version 9.15.0 du 14/06/2023-15:41 * `2a02307` update-nutools: prendre le dépôt public par défaut diff --git a/VERSION.txt b/VERSION.txt index a4fac8e..fb9e7ba 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -9.15.0 +9.16.0