add "nosync"

This commit is contained in:
Jakobus Schürz 2020-02-25 12:12:05 +01:00
parent 88b271e3ce
commit 85b6f63cbd

View file

@ -38,10 +38,15 @@ EOF
# define functions # define functions
ckrepo () { ckrepo () {
# check if remote repo is reachable # check if remote repo is reachable
if $( timeout --foreground "${MYSHELLCONFIG_GIT_TIMEOUT}" $SGIT ls-remote >/dev/null 2>&1) ;then if $MYSHELLCONFIG_NOSYNC; then
echo "no sync allowed from config" >&2
return 0 return 0
else else
return 1 if $( timeout --foreground "${MYSHELLCONFIG_GIT_TIMEOUT}" $SGIT ls-remote >/dev/null 2>&1) ;then
return 0
else
return 1
fi
fi fi
} }