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"