# HG changeset patch # User Richard Lowe # Date 1332444402 14400 # Node ID 837d1b6404bf82237a6b893114f060451d1ecb5c # Parent 8107b374f945b915f1a7f532bbe8cfbf8c1e36ab 1960 developer tools should support git (fix ws) diff -r 8107b374f945 -r 837d1b6404bf usr/src/tools/scripts/ws.sh --- a/usr/src/tools/scripts/ws.sh Tue Mar 20 15:29:39 2012 -0700 +++ b/usr/src/tools/scripts/ws.sh Thu Mar 22 15:26:42 2012 -0400 @@ -82,8 +82,8 @@ # check if it exists or not, we never did for Teamware, # since it might appear later anyway. # - if [[ "${proto##ssh://}" == "$proto" -a \ - "${proto##http://}" == "$proto" -a \ + if [[ "${proto##ssh://}" == "$proto" && \ + "${proto##http://}" == "$proto" && \ "${proto##https://}" == "$proto" ]]; then echo "${proto}/root_${MACH}" fi @@ -159,8 +159,8 @@ # # Checking for CODEMGR_WSPATH # -if [[ "(" "${CODEMGR_WSPATH}x" != "x" ")" -a "(" ! -d $wsname ")" -a \ - "(" `expr "$wsname" : "\/"` = "0" ")" ]] +if [[ -n ${CODEMGR_WSPATH} && ( ! -d $wsname ) && \ + ( `expr "$wsname" : "\/"` = "0" ) ]] then ofs=$IFS IFS=": " @@ -217,15 +217,15 @@ SRC=$wsname/usr/src; export SRC TSRC=$wsname/usr/ontest; export TSRC -if [[ "$SCM_MODE" = "teamware" -a -d ${wsname}/Codemgr_wsdata ]]; then +if [[ "$SCM_MODE" = "teamware" && -d ${wsname}/Codemgr_wsdata ]]; then CM_DATA="Codemgr_wsdata" wsosdir=$CODEMGR_WS/$CM_DATA/sunos protofile=$wsosdir/protodefs -elif [[ "$SCM_MODE" = "mercurial" -a -d ${wsname}/.hg ]]; then +elif [[ "$SCM_MODE" = "mercurial" && -d ${wsname}/.hg ]]; then CM_DATA=".hg" wsosdir=$CODEMGR_WS/$CM_DATA protofile=$wsosdir/org.opensolaris.protodefs -elif [[ "$SCM_MODE" = "git" -a -d ${wsname}/.git ]]; then +elif [[ "$SCM_MODE" = "git" && -d ${wsname}/.git ]]; then CM_DATA=".git" wsosdir=$CODEMGR_WS/$CM_DATA protofile=$wsosdir/org.opensolaris.protodefs