Browse Source

make svn status fetch depending on $var_conn

master
mxmehl 6 years ago
parent
commit
abd7cfb381
  1. 25
      status-misc.sh

25
status-misc.sh

@ -76,18 +76,31 @@ function switch_conn { @@ -76,18 +76,31 @@ function switch_conn {
# SVN STATUS
function check_svn {
STATUS=$(wget -T 5 -q -O - $SVNSTATUS)
EXIT="$?"
if ([ "$EXIT" == 4 ] || [ "$EXIT" == 6 ] || [ "$EXIT" == 28 ]); then
SVN="t/o"
if isonline; then
STATUS=$(wget -T 5 -q -O - $SVNSTATUS)
EXIT="$?"
if ([ "$EXIT" == 4 ] || [ "$EXIT" == 6 ] || [ "$EXIT" == 28 ]); then
SVN="t/o"
else
SVN=$(echo $STATUS | cut -d";" -f1)
SVN_REV=$(echo $STATUS | cut -d";" -f2)
fi
else
SVN=$(echo $STATUS | cut -d";" -f1)
SVN_REV=$(echo $STATUS | cut -d";" -f2)
SVN="offline"
SVN_REV="offline"
fi
OUT="$OUT;svn=$SVN"
TOOL="$TOOL;svn=$SVN_REV"
}
function isonline {
if [ "$var_conn" = "off" ]; then
return 1
else
return 0
fi
}
# DIRECT EXECUTE, CASE MENU
if [ "$1" == "exec" ]; then
while :; do

Loading…
Cancel
Save