Intégration de la branche release-9.16.0

This commit is contained in:
Jephté Clain 2023-06-15 15:28:28 +04:00
commit 6e36d26471
4 changed files with 23 additions and 11 deletions

View File

@ -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

View File

@ -1 +1 @@
9.15.0
9.16.0

View File

@ -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"
@ -80,20 +81,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 +104,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

View File

@ -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