cosmetic
This commit is contained in:
parent
ee80091650
commit
63674ef02b
|
@ -5,6 +5,7 @@ SCRIPTNAME=update-nutools
|
||||||
TMPSCRIPT="/tmp/$SCRIPTNAME"
|
TMPSCRIPT="/tmp/$SCRIPTNAME"
|
||||||
PRIV_REPO=http://vs-git.univ.run/modules/nutools
|
PRIV_REPO=http://vs-git.univ.run/modules/nutools
|
||||||
PUB_REPO=https://git.univ-reunion.fr/modules/nutools
|
PUB_REPO=https://git.univ-reunion.fr/modules/nutools
|
||||||
|
REPO_SUFFIX=modules/nutools
|
||||||
NAME=nutools
|
NAME=nutools
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
@ -62,13 +63,13 @@ WGET="$(which wget 2>/dev/null)"
|
||||||
if [ -n "$NUTOOLS_REPO" ]; then
|
if [ -n "$NUTOOLS_REPO" ]; then
|
||||||
REPO="$NUTOOLS_REPO"
|
REPO="$NUTOOLS_REPO"
|
||||||
elif [ -n "$CURL" ]; then
|
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"
|
REPO="$PUB_REPO"
|
||||||
else
|
else
|
||||||
REPO="$PRIV_REPO"
|
REPO="$PRIV_REPO"
|
||||||
fi
|
fi
|
||||||
elif [ -n "$WGET" ]; then
|
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"
|
REPO="$PUB_REPO"
|
||||||
else
|
else
|
||||||
REPO="$PRIV_REPO"
|
REPO="$PRIV_REPO"
|
||||||
|
|
Loading…
Reference in New Issue