/[cvs]/ccvs/src/sanity.sh
ViewVC logotype

Diff of /ccvs/src/sanity.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1092 by dprice, Mon Oct 3 20:07:14 2005 UTC revision 1.1093 by dprice, Tue Oct 4 15:25:55 2005 UTC
# Line 761  version_test () Line 761  version_test ()
761  # Example: find_tool awk:gawk:nawk awk_tooltest1 awk_tooltest2  # Example: find_tool awk:gawk:nawk awk_tooltest1 awk_tooltest2
762  find_tool ()  find_tool ()
763  {  {
764    default_TOOL=$1    dTn=$1
765      default_TOOL=$2
766    echo find_tool: ${1+"$@"} >>$LOGFILE    echo find_tool: ${1+"$@"} >>$LOGFILE
767    cmds="`IFS=:; echo $1`"; shift; tooltests="${1+$@}"    cmds="`IFS=:; echo $2`"; shift; shift; tooltests="${1+$@}"
768    if test -z "$tooltests"; then tooltests=version_test; fi    if test -z "$tooltests"; then tooltests=version_test; fi
769    clist=; for cmd in $cmds; do clist="$clist `Which -a $cmd`"; done    clist=; for cmd in $cmds; do clist="$clist `Which -a $cmd`"; done
770    # Make sure the default tool is just the first real command name    # Make sure the default tool is just the first real command name
# Line 796  find_tool () Line 797  find_tool ()
797      fi      fi
798    done    done
799    if test -n "$TOOL"; then    if test -n "$TOOL"; then
800      echo "Notice: The default version of \`$default_TOOL' is defective." >>$LOGFILE      echo "Notice: The default version of $dTn (\`$default_TOOL')" >>$LOGFILE
801      echo "using \`$TOOL' and hoping for the best." >>$LOGFILE      echo "is defective.  Using \`$TOOL' and hoping for the best." >>$LOGFILE
802      echo "Notice: The default version of \`$default_TOOL' is defective." >&2      echo "Notice: The default version of $dTn (\`$default_TOOL')" >&2
803      echo "using \`$TOOL' and hoping for the best." >&2      echo "is defective.  Using \`$TOOL' and hoping for the best." >&2
804      echo $TOOL      echo $TOOL
805    else    else
806      echo $default_TOOL      echo $default_TOOL
807    fi    fi
808  }    }
809    
810  id_tool_test ()  id_tool_test ()
811  {  {
# Line 819  id_tool_test () Line 820  id_tool_test ()
820    fi    fi
821  }  }
822    
823  ID=`find_tool id version_test id_tool_test`  ID=`find_tool id id version_test id_tool_test`
824  echo "Using ID=$ID" >>$LOGFILE  echo "Using ID=$ID" >>$LOGFILE
825    
826  # You can't run CVS as root; print a nice error message here instead  # You can't run CVS as root; print a nice error message here instead
# Line 964  else Line 965  else
965  fi  fi
966  }  }
967    
968  EXPR=`find_tool ${EXPR}:gexpr \  EXPR=`find_tool expr ${EXPR}:gexpr \
969    version_test expr_tooltest1 expr_tooltest2 expr_tooltest3 \    version_test expr_tooltest1 expr_tooltest2 expr_tooltest3 \
970  expr_set_ENDANCHOR expr_set_DOTSTAR expr_tooltest_DOTSTAR`  expr_set_ENDANCHOR expr_set_DOTSTAR expr_tooltest_DOTSTAR`
971    
# Line 1044  fi Line 1045  fi
1045  return 0  return 0
1046  }  }
1047    
1048  TR=`find_tool ${TR}:gtr version_test tr_tooltest1`  TR=`find_tool tr ${TR}:gtr version_test tr_tooltest1`
1049  echo "Using TR=$TR" >>$LOGFILE  echo "Using TR=$TR" >>$LOGFILE
1050    
1051  # MacOS X (10.2.8) has a /bin/ls that does not work correctly in that  # MacOS X (10.2.8) has a /bin/ls that does not work correctly in that
# Line 1069  else Line 1070  else
1070    return 0    return 0
1071  fi  fi
1072  }  }
1073  LS=`find_tool ls:gls version_test ls_tooltest`  LS=`find_tool ls ls:gls version_test ls_tooltest`
1074  echo "Using LS=$LS" >>$LOGFILE  echo "Using LS=$LS" >>$LOGFILE
1075    
1076  # Awk testing  # Awk testing
# Line 1111  rm abc Line 1112  rm abc
1112  return 0  return 0
1113  }  }
1114    
1115  AWK=`find_tool gawk:nawk:awk version_test awk_tooltest1 awk_tooltest2`  AWK=`find_tool awk gawk:nawk:awk version_test awk_tooltest1 awk_tooltest2`
1116  echo "Using AWK=$AWK" >>$LOGFILE  echo "Using AWK=$AWK" >>$LOGFILE
1117    
1118    

Legend:
Removed from v.1.1092  
changed lines
  Added in v.1.1093

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26