[CalendarServer-changes] [4615] CalendarServer/branches/egg-info-351

source_changes at macosforge.org source_changes at macosforge.org
Tue Oct 20 14:13:33 PDT 2009


Revision: 4615
          http://trac.macosforge.org/projects/calendarserver/changeset/4615
Author:   glyph at apple.com
Date:     2009-10-20 14:13:29 -0700 (Tue, 20 Oct 2009)
Log Message:
-----------
fix my mangling of the coding standard:

  - 2-space indents in a few places that still had 4
  - line up assignments
  - semicolons after every statement
  - 'then' and 'do' on same line as expression
  - compress case statements with short condition suites

Modified Paths:
--------------
    CalendarServer/branches/egg-info-351/run
    CalendarServer/branches/egg-info-351/support/pystuff.sh
    CalendarServer/branches/egg-info-351/support/runlib.sh
    CalendarServer/branches/egg-info-351/test

Modified: CalendarServer/branches/egg-info-351/run
===================================================================
--- CalendarServer/branches/egg-info-351/run	2009-10-20 20:41:55 UTC (rev 4614)
+++ CalendarServer/branches/egg-info-351/run	2009-10-20 21:13:29 UTC (rev 4615)
@@ -29,11 +29,11 @@
 # executable to start the server.
 ##
 
-set -e
-set -u
+set -e;
+set -u;
 
 wd="$(cd "$(dirname "$0")" && pwd)";
 
-. support/runlib.sh
+. support/runlib.sh;
 
-run_main "$@"
+run_main "$@";

Modified: CalendarServer/branches/egg-info-351/support/pystuff.sh
===================================================================
--- CalendarServer/branches/egg-info-351/support/pystuff.sh	2009-10-20 20:41:55 UTC (rev 4614)
+++ CalendarServer/branches/egg-info-351/support/pystuff.sh	2009-10-20 21:13:29 UTC (rev 4615)
@@ -1,5 +1,22 @@
+#! /bin/bash
 # -*- sh-basic-offset: 2 -*-
 
+##
+# Copyright (c) 2005-2009 Apple Inc. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+##
+
 # Echo the major.minor version of the given Python interpreter.
 
 py_version () {
@@ -13,21 +30,18 @@
 try_python () {
   local python="$1"; shift;
 
-  if [ -z "${python}" ]
-  then
-    return 1
+  if [ -z "${python}" ]; then
+    return 1;
   fi
-  if ! type "${python}" > /dev/null 2>&1
-  then
-    return 1
+  if ! type "${python}" > /dev/null 2>&1; then
+    return 1;
   fi
 
-  local py_version="$(py_version "${python}")"
-  if [ "${py_version/./}" -lt "25" ]
-  then
-    return 1
+  local py_version="$(py_version "${python}")";
+  if [ "${py_version/./}" -lt "25" ]; then
+    return 1;
   fi
-  return 0
+  return 0;
 }
 
 
@@ -50,19 +64,18 @@
       "/sw/bin/python${v}"						\
       ;
     do
-      if try_python "${p}"
-      then
-        echo "${p}"
-        return 0
+      if try_python "${p}"; then
+        echo "${p}";
+        return 0;
       fi
     done
   done
-  return 1
+  return 1;
 }
 
 # Detect if the given Python module is installed in the system Python configuration.
 py_have_module () {
-    local module="$1"; shift;
+  local module="$1"; shift;
     PYTHONPATH="" "${python}" -c "import ${module}" > /dev/null 2>&1;
 }
 
@@ -70,21 +83,20 @@
 # setting up variables related to version and build configuration.
 
 init_pystuff () {
-  python="$(detect_python_version)"
+  python="$(detect_python_version)";
 
-  if [ -z "${python:-}" ]
-  then
-    echo "No suitable python found. Python 2.5 is required."
-    exit 1
+  if [ -z "${python:-}" ]; then
+    echo "No suitable python found. Python 2.5 is required.";
+    exit 1;
   else
-      echo "Using ${python} as Python";
+    echo "Using ${python} as Python";
   fi
 
-  py_platform="$("${python}" -c "from distutils.util import get_platform; print get_platform()")";
-  py_version="$(py_version "${python}")";
+         py_platform="$("${python}" -c "from distutils.util import get_platform; print get_platform()")";
+          py_version="$(py_version "${python}")";
   py_platform_libdir="lib.${py_platform}-${py_version}";
-  py_prefix="$("${python}" -c "import sys; print sys.prefix;")";
-  py_libdir="$("${python}" -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1);")";
+           py_prefix="$("${python}" -c "import sys; print sys.prefix;")";
+           py_libdir="$("${python}" -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1);")";
 }
 
-init_pystuff
+init_pystuff;

Modified: CalendarServer/branches/egg-info-351/support/runlib.sh
===================================================================
--- CalendarServer/branches/egg-info-351/support/runlib.sh	2009-10-20 20:41:55 UTC (rev 4614)
+++ CalendarServer/branches/egg-info-351/support/runlib.sh	2009-10-20 21:13:29 UTC (rev 4615)
@@ -17,17 +17,16 @@
 # limitations under the License.
 ##
 
-. support/pystuff.sh
+. support/pystuff.sh;
 
 # Echo the usage for the main 'run' script, then exit with an error.
 usage () {
   program="$(basename "$0")";
 
-  if [ "${1--}" != "-" ]
-  then
-    echo "$@"
-    echo
-  fi
+  if [ "${1--}" != "-" ]; then
+    echo "$@";
+    echo;
+  fi;
 
   echo "Usage: ${program} [-hvgsfnpdkrR] [-K key] [-iI dst] [-t type] [-S statsdirectory] [-P plugin]";
   echo "Options:";
@@ -49,103 +48,48 @@
   echo "	-P  Select the twistd plugin name [${plugin_name}]";
   echo "	-R  Twisted Reactor plugin to execute [${reactor}]";
 
-  if [ "${1-}" == "-" ]
-  then
-    return 0
-  fi
-  exit 64
+  if [ "${1-}" == "-" ]; then
+    return 0;
+  fi;
+  exit 64;
 }
 
 # Provide a default value: if the variable named by the first argument is
 # empty, set it to the default in the second argument.
 conditional_set () {
-  local var="$1"; shift
-  local default="$1"; shift
-  if [ -z "$(eval echo "\${${var}:-}")" ]
-  then
-    eval "${var}=\${default:-}"
-  fi
+  local var="$1"; shift;
+  local default="$1"; shift;
+  if [ -z "$(eval echo "\${${var}:-}")" ]; then
+    eval "${var}=\${default:-}";
+  fi;
 }
 
 parse_run_options () {
-  while getopts 'hvgsfnpdkrK:i:I:t:S:P:R:' option
-  do
+  while getopts 'hvgsfnpdkrK:i:I:t:S:P:R:' option; do
     case "$option" in
-      '?')
-        usage
-        ;;
-      'h')
-        usage -
-        exit 0
-        ;;
-      'v')
-        verbose="-v"
-        ;;
-      'f')
-        force_setup="true"
-        ;;
-      'k')
-        kill="true"
-        ;;
-      'r')
-        restart="true"
-        ;;
-      'd')
-        daemonize=""
-        ;;
-      'P')
-        plugin_name="${OPTARG}"
-        ;;
-      'R')
-        reactor="-R ${OPTARG}"
-        ;;
-      't')
-        service_type="${OPTARG}"
-        ;;
-      'K')
-        read_key="${OPTARG}"
-        ;;
-      'S')
-        profile="--profiler cprofile -p ${OPTARG}"
-        ;;
-      'g')
-        do_get="true"
-        do_setup="false"
-        do_run="false"
-        ;;
-      's')
-        do_get="true"
-        do_setup="true"
-        do_run="false"
-        ;;
-      'p')
-        do_get="false"
-        do_setup="false"
-        do_run="false"
-        print_path="true"
-        ;;
-      'i')
-        do_get="true"
-        do_setup="true"
-        do_run="false"
-        install="${OPTARG}"
-        install_flag="--root="
-        ;;
-      'I')
-        do_get="true"
-        do_setup="true"
-        do_run="false"
-        install="${wd}/build/dst"
-        install_flag="--root="
-        install_home="${OPTARG}"
-        ;;
-    esac
-  done
-  shift $((${OPTIND} - 1))
-  if [ $# != 0 ]
-  then
-    usage "Unrecognized arguments:" "$@"
-  fi
+      '?') usage; ;;
+      'h') usage -; exit 0; ;;
+      'v')       verbose="-v"; ;;
+      'f')   force_setup="true"; ;;
+      'k')          kill="true"; ;;
+      'r')       restart="true"; ;;
+      'd')     daemonize=""; ;;
+      'P')   plugin_name="${OPTARG}"; ;;
+      'R')       reactor="-R ${OPTARG}"; ;;
+      't')  service_type="${OPTARG}"; ;;
+      'K')      read_key="${OPTARG}"; ;;
+      'S')       profile="--profiler cprofile -p ${OPTARG}"; ;;
+      'g') do_get="true" ; do_setup="false"; do_run="false"; ;;
+      's') do_get="true" ; do_setup="true" ; do_run="false"; ;;
+      'p') do_get="false"; do_setup="false"; do_run="false"; print_path="true"; ;;
+      'i') do_get="true" ; do_setup="true" ; do_run="false"; install="${OPTARG}"; install_flag="--root="; ;;
+      'I') do_get="true" ; do_setup="true" ; do_run="false"; install="${wd}/build/dst"; install_flag="--root="; install_home="${OPTARG}"; ;;
+    esac;
+  done;
+  shift $((${OPTIND} - 1));
+  if [ $# != 0 ]; then
+    usage "Unrecognized arguments:" "$@";
+  fi;
 }
 
 conf_read_key ()
@@ -161,84 +105,73 @@
 # Initialize all the global state required to use this library.
 init_runlib () {
 
-  verbose="";
-  do_get="true";
-  do_setup="true";
-  do_run="true";
-  force_setup="false";
+        verbose="";
+         do_get="true";
+       do_setup="true";
+         do_run="true";
+    force_setup="false";
   disable_setup="false";
-  print_path="false";
-  install="";
-  daemonize="-X";
-  kill="false";
-  restart="false";
-  plugin_name="caldav";
-  service_type="Combined";
-  read_key="";
-  profile="";
-  reactor="";
+     print_path="false";
+        install="";
+      daemonize="-X";
+           kill="false";
+        restart="false";
+    plugin_name="caldav";
+   service_type="Combined";
+       read_key="";
+        profile="";
+        reactor="";
 
   # These variables are defaults for things which might be configured by
   # environment; only set them if they're un-set.
-  conditional_set wd "$(pwd)"
-  conditional_set config "${wd}/conf/caldavd-dev.plist"
-  conditional_set caldav "${wd}"
+  conditional_set wd "$(pwd)";
+  conditional_set config "${wd}/conf/caldavd-dev.plist";
+  conditional_set caldav "${wd}";
 
-  if [ -z "${CALENDARSERVER_CACHE_DEPS-}" ]
-  then
-    cache_deps="${wd}/.dependencies"
+  if [ -z "${CALENDARSERVER_CACHE_DEPS-}" ]; then
+    cache_deps="${wd}/.dependencies";
   else
-    cache_deps="${CALENDARSERVER_CACHE_DEPS}"
-  fi
+    cache_deps="${CALENDARSERVER_CACHE_DEPS}";
+  fi;
 
-  if [ -z "${caldavd_wrapper_command:-}" ]
-  then
-    if [ "$(uname -s)" == "Darwin" ] && [ "$(uname -r | cut -d . -f 1)" -ge 9 ]
-    then
-      caldavd_wrapper_command="launchctl bsexec /"
+  if [ -z "${caldavd_wrapper_command:-}" ]; then
+    if [ "$(uname -s)" == "Darwin" ] && [ "$(uname -r | cut -d . -f 1)" -ge 9 ]; then
+      caldavd_wrapper_command="launchctl bsexec /";
     else
-      caldavd_wrapper_command=""
-    fi
-  fi
+      caldavd_wrapper_command="";
+    fi;
+  fi;
 
-  top="$(cd "${caldav}/.." && pwd -L)"
+      top="$(cd "${caldav}/.." && pwd -L)";
   patches="${caldav}/lib-patches";
   twisted="${top}/Twisted";
-  dav="${twisted}/twisted/web2/dav"
+      dav="${twisted}/twisted/web2/dav";
 
   # Find a command that can hash up a string for us
-  if type -t openssl > /dev/null
-  then
-    hash="hash"
-    hash () {
-      openssl dgst -md5
-    }
-  elif type -t md5 > /dev/null
-  then
-    hash="md5"
-  elif type -t md5sum > /dev/null
-  then
-    hash="md5sum"
-  elif type -t cksum > /dev/null
-  then
-    hash="hash"
+  if type -t openssl > /dev/null; then
+    hash="hash";
+    hash () { openssl dgst -md5; }
+  elif type -t md5 > /dev/null; then
+    hash="md5";
+  elif type -t md5sum > /dev/null; then
+    hash="md5sum";
+  elif type -t cksum > /dev/null; then
+    hash="hash";
     hash () { cksum | cut -f 1 -d " "; }
-  elif type -t sum > /dev/null
-  then
-    hash="hash"
+  elif type -t sum > /dev/null; then
+    hash="hash";
     hash () { sum | cut -f 1 -d " "; }
   else
-    hash=""
-  fi
+    hash="";
+  fi;
 
-
   if [ -n "${install}" ] && ! echo "${install}" | grep '^/' > /dev/null; then
     install="$(pwd)/${install}";
   fi;
 
   svn_uri_base="$(svn info "${caldav}" --xml 2> /dev/null | sed -n 's|^.*<root>\(.*\)</root>.*$|\1|p')";
 
-  conditional_set svn_uri_base "http://svn.calendarserver.org/repository/calendarserver"
+  conditional_set svn_uri_base "http://svn.calendarserver.org/repository/calendarserver";
 }
 
 # The main-point of the 'run' script: parse all options, decide what to do,
@@ -248,63 +181,56 @@
   parse_run_options "$@"
 
   # If we've been asked to read a configuration key, just read it and exit.
-  if [ -n "${read_key}" ]
-  then
-    conf_read_key "${read_key}"
-    exit $?
-  fi
-  
-  if "${kill}" || "${restart}"
-  then
-    pidfile="$(conf_read_key "PIDFile")"
-    if [ ! -r "${pidfile}" ]
-    then
-      echo "Unreadable PID file: ${pidfile}"
+  if [ -n "${read_key}" ]; then
+    conf_read_key "${read_key}";
+    exit $?;
+  fi;
+
+  if "${kill}" || "${restart}"; then
+    pidfile="$(conf_read_key "PIDFile")";
+    if [ ! -r "${pidfile}" ]; then
+      echo "Unreadable PID file: ${pidfile}";
       exit 1
-    fi
-    pid="$(cat "${pidfile}" | head -1)"
-    if [ -z "${pid}" ]
-    then
-      echo "No PID in PID file: ${pidfile}"
-      exit 1
-    fi
-    echo "Killing process ${pid}"
-    kill -TERM "${pid}"
-    if ! "${restart}"
-    then
-      exit 0
-    fi
-  fi
+    fi;
+    pid="$(cat "${pidfile}" | head -1)";
+    if [ -z "${pid}" ]; then
+      echo "No PID in PID file: ${pidfile}";
+      exit 1;
+    fi;
+    echo "Killing process ${pid}";
+    kill -TERM "${pid}";
+    if ! "${restart}"; then
+      exit 0;
+    fi;
+  fi;
 
   # Prepare to set up PYTHONPATH et. al.
-  if [ -z "${PYTHONPATH:-}" ]
-  then
-    user_python_path=""
+  if [ -z "${PYTHONPATH:-}" ]; then
+    user_python_path="";
   else
-    user_python_path=":${PYTHONPATH}"
-  fi
+    user_python_path=":${PYTHONPATH}";
+  fi;
 
   export PYTHONPATH="${caldav}";
 
   # About to do something for real; let's enumerate (and depending on options,
   # possibly download and/or install) the dependencies.
-  dependencies
+  dependencies;
 
   # If we're installing, install the calendar server itself.
-  py_install "Calendar Server" "${caldav}"
+  py_install "Calendar Server" "${caldav}";
 
-  if [ -n "${install_home:-}" ]
-  then
-    do_home_install
-  fi
+  if [ -n "${install_home:-}" ]; then
+    do_home_install;
+  fi;
 
   # Finish setting up PYTHONPATH (put the user's original path at the *end* so
   # that CalendarServer takes precedence).
-  
+
   export PYTHONPATH="${PYTHONPATH}${user_python_path}";
 
   # Finally, run the server.
-  run
+  run;
 }
 
 
@@ -342,10 +268,10 @@
 
   fi;
 
-  echo ""
-  echo "Removing build directory ${path}/build..."
+  echo "";
+  echo "Removing build directory ${path}/build...";
   rm -rf "${path}/build";
-  echo "Removing pyc files from ${path}..."
+  echo "Removing pyc files from ${path}...";
   find "${path}" -type f -name '*.pyc' -print0 | xargs -0 rm -f;
 }
 
@@ -372,14 +298,12 @@
 
     echo "";
 
-    if [ -n "${cache_deps}" ] && [ -n "${hash}" ]
-    then
+    if [ -n "${cache_deps}" ] && [ -n "${hash}" ]; then
       mkdir -p "${cache_deps}";
 
       cache_file="${cache_deps}/${name}-$(echo "${url}" | "${hash}")-$(basename "${url}")";
 
-      if [ ! -f "${cache_file}" ]
-      then
+      if [ ! -f "${cache_file}" ]; then
 	echo "Downloading ${name}...";
 	curl -L "${url}" -o "${cache_file}";
       fi;
@@ -387,9 +311,9 @@
       echo "Unpacking ${name} from cache...";
       get () { cat "${cache_file}"; }
     else
-      echo "Downloading ${name}..."; 
+      echo "Downloading ${name}...";
       get () { curl -L "${url}"; }
-    fi
+    fi;
 
     rm -rf "${path}";
     cd "$(dirname "${path}")";
@@ -402,16 +326,18 @@
 
 # If do_get is turned on, check a name out from SVN.
 svn_get () {
-  if ! "${do_get}"; then return 0; fi;
+  if ! "${do_get}"; then
+    return 0;
+  fi;
 
   local     name="$1"; shift;
   local     path="$1"; shift;
   local      uri="$1"; shift;
   local revision="$1"; shift;
-  
+
   if [ -d "${path}" ]; then
     local wc_uri="$(svn info --xml "${path}" 2> /dev/null | sed -n 's|^.*<url>\(.*\)</url>.*$|\1|p')";
-    
+
     if "${force_setup}"; then
       # Verify that we have a working copy checked out from the correct URI
       if [ "${wc_uri}" != "${uri}" ]; then
@@ -525,24 +451,24 @@
 
 
 py_build () {
-    local     name="$1"; shift;
-    local     path="$1"; shift;
-    local optional="$1"; shift;
+  local     name="$1"; shift;
+  local     path="$1"; shift;
+  local optional="$1"; shift;
 
-    if "${do_setup}"; then
-      echo "";
-      echo "Building ${name}...";
-      cd "${path}";
-      if ! "${python}" ./setup.py -q build --build-lib "build/${py_platform_libdir}" "$@"; then
-          if "${optional}"; then
-              echo "WARNING: ${name} failed to build.";
-              echo "WARNING: ${name} is not required to run the server; continuing without it.";
-          else
-              return $?;
-          fi;
+  if "${do_setup}"; then
+    echo "";
+    echo "Building ${name}...";
+    cd "${path}";
+    if ! "${python}" ./setup.py -q build --build-lib "build/${py_platform_libdir}" "$@"; then
+      if "${optional}"; then
+        echo "WARNING: ${name} failed to build.";
+        echo "WARNING: ${name} is not required to run the server; continuing without it.";
+      else
+        return $?;
       fi;
-      cd /;
     fi;
+    cd /;
+  fi;
 }
 
 py_install () {
@@ -564,81 +490,76 @@
 py_dependency () {
 
   # args
-  local name="$1"; shift            # the name of the package (for display)
-  local module="$1"; shift          # the name of the python module.
-  local distribution="$1"; shift    # the name of the directory to put the distribution into.
-  local get_type="$1"; shift        # what protocol should be used?
-  local get_uri="$1"; shift         # what URL should be fetched?
-  local optional="$1"; shift        # is this dependency optional?
-  local override_system="$1"; shift # do I need to get this dependency even if
-                                    # the system already has it?
-  local inplace="$1"; shift # do development in-place; don't run setup.py to
-                            # build, and instead add the source directory
-                            # directly to sys.path.  twisted and vobject are
-                            # developed often enough that this is convenient.
-  local skip_egg="$1"; shift  # skip even the 'egg_info' step, because nothing
-                              # needs to be built.
-  local revision="$1"; shift        # what revision to check out (for SVN dependencies)
+  local            name="$1"; shift; # the name of the package (for display)
+  local          module="$1"; shift; # the name of the python module.
+  local    distribution="$1"; shift; # the name of the directory to put the distribution into.
+  local        get_type="$1"; shift; # what protocol should be used?
+  local         get_uri="$1"; shift; # what URL should be fetched?
+  local        optional="$1"; shift; # is this dependency optional?
+  local override_system="$1"; shift; # do I need to get this dependency even if
+                                     # the system already has it?
+  local         inplace="$1"; shift; # do development in-place; don't run setup.py to
+                                     # build, and instead add the source directory
+                                     # directly to sys.path.  twisted and vobject are
+                                     # developed often enough that this is convenient.
+  local        skip_egg="$1"; shift; # skip even the 'egg_info' step, because nothing
+                                     # needs to be built.
+  local        revision="$1"; shift; # what revision to check out (for SVN dependencies)
   # end args
+  local          srcdir="${top}/${distribution}"
 
-  local srcdir="${top}/${distribution}"
-
-  if "${override_system}" || ! py_have_module "${module}"
-  then
+  if "${override_system}" || ! py_have_module "${module}"; then
     "${get_type}_get" "${name}" "${srcdir}" "${get_uri}" "${revision}"
-    if "${inplace}"
-    then
-      if "${override_system}" && ! "${skip_egg}"
-      then
-        echo
-        echo "${name} overrides system, building egg only"
-        cd "${srcdir}"
-        "${python}" ./setup.py egg_info
-        cd /
-      fi
+    if "${inplace}"; then
+      if "${override_system}" && ! "${skip_egg}"; then
+        echo;
+        echo "${name} overrides system, building egg only";
+        cd "${srcdir}";
+        "${python}" ./setup.py egg_info;
+        cd /;
+      fi;
     else
-      py_build "${name}" "${srcdir}" "${optional}"
-    fi
-    py_install "${name}" "${srcdir}"
-  fi
+      py_build "${name}" "${srcdir}" "${optional}";
+    fi;
+    py_install "${name}" "${srcdir}";
+  fi;
 
-  if "$inplace"
-  then
-    local add_path="${srcdir}"
+  if "$inplace"; then
+    local  add_path="${srcdir}";
   else
-    local add_path="${srcdir}/build/${py_platform_libdir}"
-  fi
-  export PYTHONPATH="${PYTHONPATH}:${add_path}"
+    local  add_path="${srcdir}/build/${py_platform_libdir}";
+  fi;
+  export PYTHONPATH="${PYTHONPATH}:${add_path}";
 }
 
 
 # Declare a dependency on a C project built with autotools.
 
 c_dependency () {
-  local name="$1"; shift
-  local path="$1"; shift
-  local uri="$1"; shift
+  local name="$1"; shift;
+  local path="$1"; shift;
+  local  uri="$1"; shift;
+
   # Extra arguments are processed below, as arguments to './configure'.
 
-  srcdir="${top}/${path}"
+  srcdir="${top}/${path}";
 
-  www_get "${name}" "${srcdir}" "${uri}"
+  www_get "${name}" "${srcdir}" "${uri}";
 
   if "${do_setup}" && (
-      "${force_setup}" || [ ! -d "${srcdir}/_root" ])
-  then
-    echo ""
-    echo "Building ${name}..."
-    cd "${srcdir}"
-    ./configure --prefix="${srcdir}/_root" "$@"
-    make
-    make install
-  fi
+      "${force_setup}" || [ ! -d "${srcdir}/_root" ]); then
+    echo "";
+    echo "Building ${name}...";
+    cd "${srcdir}";
+    ./configure --prefix="${srcdir}/_root" "$@";
+    make;
+    make install;
+  fi;
 
-  export PATH="${PATH}:${srcdir}/_root/bin"
-  export C_INCLUDE_PATH="${C_INCLUDE_PATH:-}:${srcdir}/_root/include"
-  export LD_LIBRARY_PATH="${LD_LIBRARY_PATH:-}:${srcdir}/_root/lib"
-  export DYLD_LIBRARY_PATH="${DYLD_LIBRARY_PATH:-}:${srcdir}/_root/lib"
+  export              PATH="${PATH}:${srcdir}/_root/bin";
+  export    C_INCLUDE_PATH="${C_INCLUDE_PATH:-}:${srcdir}/_root/include";
+  export   LD_LIBRARY_PATH="${LD_LIBRARY_PATH:-}:${srcdir}/_root/lib";
+  export DYLD_LIBRARY_PATH="${DYLD_LIBRARY_PATH:-}:${srcdir}/_root/lib";
 }
 
 
@@ -650,97 +571,93 @@
 dependencies () {
 
   # Dependencies compiled from C source code
-  local le="libevent-1.4.8-stable"
+  local le="libevent-1.4.8-stable";
   c_dependency "libevent" "${le}" \
-    "http://monkey.org/~provos/libevent-1.4.8-stable.tar.gz"
+    "http://monkey.org/~provos/libevent-1.4.8-stable.tar.gz";
   c_dependency "memcached" "memcached-1.2.6" \
     "http://www.danga.com/memcached/dist/memcached-1.2.6.tar.gz" \
-    --enable-threads --with-libevent="${top}/${le}/_root"
+    --enable-threads --with-libevent="${top}/${le}/_root";
 
   # Python dependencies
   py_dependency "Zope Interface" "zope.interface" "zope.interface-3.3.0" \
     "www" "http://www.zope.org/Products/ZopeInterface/3.3.0/zope.interface-3.3.0.tar.gz" \
-    false false false false 0
+    false false false false 0;
   py_dependency "PyXML" "xml.dom.ext" "PyXML-0.8.4" \
     "www" "http://internap.dl.sourceforge.net/sourceforge/pyxml/PyXML-0.8.4.tar.gz" \
-    false false false false 0
+    false false false false 0;
   py_dependency "PyOpenSSL" "OpenSSL" "pyOpenSSL-0.7" \
     "www" "http://pypi.python.org/packages/source/p/pyOpenSSL/pyOpenSSL-0.7.tar.gz" \
-    false false false false 0
-  if type krb5-config > /dev/null
-  then
+    false false false false 0;
+  if type krb5-config > /dev/null; then
     py_dependency "PyKerberos" "kerberos" "PyKerberos" \
       "svn" "${svn_uri_base}/PyKerberos/trunk" \
-      false false false false 4241
-  fi
-  if [ "$(uname -s)" == "Darwin" ]
-  then
+      false false false false 4241;
+  fi;
+  if [ "$(uname -s)" == "Darwin" ]; then
     py_dependency "PyOpenDirectory" "opendirectory" "PyOpenDirectory" \
       "svn" "${svn_uri_base}/PyOpenDirectory/trunk" \
-      false false false false 4106
-  fi
+      false false false false 4106;
+  fi;
   py_dependency "xattr" "xattr" "xattr" \
     "svn" "http://svn.red-bean.com/bob/xattr/releases/xattr-0.5" \
-    false false false false 1013
-  if [ "${py_version}" != "${py_version##2.5}" ] && ! py_have_module select26
-  then
+    false false false false 1013;
+  if [ "${py_version}" != "${py_version##2.5}" ] && ! py_have_module select26; then
     py_dependency "select26" "select26" "select26" \
       "www" "http://pypi.python.org/packages/source/s/select26/select26-0.1a3.tar.gz" \
-      true false false false 0
-  fi
+      true false false false 0;
+  fi;
 
   case "${USER}" in
     wsanchez)
-      proto="svn+ssh"
+      proto="svn+ssh";
       ;;
     *)
-      proto="svn"
+      proto="svn";
       ;;
-  esac
+  esac;
 
   py_dependency "Twisted" "twisted" "Twisted" \
     "svn" "${proto}://svn.twistedmatrix.com/svn/Twisted/branches/dav-take-two-3081-4" \
-    false true true false 26969
+    false true true false 26969;
 
   # twisted.web2 doesn't get installed by default, so in the install phase
   # let's make sure it does.
-  if [ -n "${install}" ]
-  then
+  if [ -n "${install}" ]; then
     echo "";
     echo "Installing Twisted.web2...";
     cd "${twisted}";
     "${python}" ./twisted/web2/topfiles/setup.py install "${install_flag}${install}";
     cd /;
-  fi
+  fi;
 
   py_dependency "dateutil" "dateutil" "python-dateutil-1.4.1" \
     "www" "http://www.labix.org/download/python-dateutil/python-dateutil-1.4.1.tar.gz" \
-    false false false false 0
+    false false false false 0;
 
   case "${USER}" in
     cyrusdaboo)
-      base="svn+ssh://cdaboo@svn.osafoundation.org/svn"
+      base="svn+ssh://cdaboo@svn.osafoundation.org/svn";
       ;;
     *)
-      base="http://svn.osafoundation.org"
+      base="http://svn.osafoundation.org";
       ;;
-  esac
+  esac;
 
   # XXX actually vObject should be imported in-place.
   py_dependency "vObject" "vobject" "vobject" \
     "svn" "${base}/vobject/trunk" \
-    false true true true 212
+    false true true true 212;
 
   py_dependency "PyDirector" "pydirector" "pydirector-1.0.0" \
     "www" http://internap.dl.sourceforge.net/sourceforge/pythondirector/pydirector-1.0.0.tar.gz \
-    false false false false 0
+    false false false false 0;
 
   # Tool dependencies.  The code itself doesn't depend on these, but you probably want them.
-  svn_get "CalDAVTester" "${top}/CalDAVTester" "${svn_uri_base}/CalDAVTester/trunk" 4517
-  svn_get "Pyflakes" "${top}/Pyflakes" http://divmod.org/svn/Divmod/trunk/Pyflakes 17198
-  echo 'Dependencies done.'
+  svn_get "CalDAVTester" "${top}/CalDAVTester" "${svn_uri_base}/CalDAVTester/trunk" 4517;
+  svn_get "Pyflakes" "${top}/Pyflakes" http://divmod.org/svn/Divmod/trunk/Pyflakes 17198;
+  echo 'Dependencies done.';
 }
 
 
 # Actually do the initialization, once all functions are defined.
-init_runlib
+init_runlib;

Modified: CalendarServer/branches/egg-info-351/test
===================================================================
--- CalendarServer/branches/egg-info-351/test	2009-10-20 20:41:55 UTC (rev 4614)
+++ CalendarServer/branches/egg-info-351/test	2009-10-20 21:13:29 UTC (rev 4615)
@@ -16,12 +16,12 @@
 # limitations under the License.
 ##
 
-set -e
-set -u
+set -e;
+set -u;
 
-wd="$(cd "$(dirname "$0")" && pwd -L)"
+wd="$(cd "$(dirname "$0")" && pwd -L)";
 
-. support/pystuff.sh
+. support/pystuff.sh;
 
 random="--random=$(date "+%s")";
 no_colour="";
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20091020/d02b5b1d/attachment-0001.html>


More information about the calendarserver-changes mailing list