[CalendarServer-changes] [2508] CalendarServer/trunk/run

source_changes at macosforge.org source_changes at macosforge.org
Tue May 27 21:14:47 PDT 2008


Revision: 2508
          http://trac.macosforge.org/projects/calendarserver/changeset/2508
Author:   wsanchez at apple.com
Date:     2008-05-27 21:14:46 -0700 (Tue, 27 May 2008)

Log Message:
-----------
Add -g option.

Modified Paths:
--------------
    CalendarServer/trunk/run

Modified: CalendarServer/trunk/run
===================================================================
--- CalendarServer/trunk/run	2008-05-27 15:34:31 UTC (rev 2507)
+++ CalendarServer/trunk/run	2008-05-28 04:14:46 UTC (rev 2508)
@@ -28,7 +28,9 @@
 ##
 
       verbose="";
-   setup_only="false";
+       do_get="true";
+     do_setup="true";
+       do_run="true";
   force_setup="false";
 disable_setup="false";
    print_path="false";
@@ -47,45 +49,47 @@
 
   if [ "${1--}" != "-" ]; then echo "$@"; echo; fi;
 
-  echo "Usage: ${program} [-hvsfpndkr] [-K key] [-iI dst] [-t type] [-S statsdirectory]";
+  echo "Usage: ${program} [-hvgsfnpdkr] [-K key] [-iI dst] [-t type] [-S statsdirectory] [-P plugin]";
   echo "Options:";
   echo "	-h  Print this help and exit";
   echo "	-v  Be verbose";
+  echo "	-g  Get dependencies only; don't run setup or run the server.";
   echo "	-s  Run setup only; don't run server";
   echo "	-f  Force setup to run";
+  echo "	-n  Do not run setup";
   echo "	-p  Print PYTHONPATH value for server and exit";
-  echo "	-n  Do not run setup";
   echo "        -d  Run caldavd as a daemon";
   echo "        -k  Stop caldavd";
   echo "        -r  Restart caldavd";
   echo "        -K  Print value of configuration key and exit";
   echo "        -i  Perform a system install into dst; implies -s";
   echo "        -I  Perform a home install into dst; implies -s";
-  echo "        -t  Select the server process type (Master, Slave or Combined)";
+  echo "        -t  Select the server process type (Master, Slave or Combined) [${service_type}]";
   echo "        -S  Write a pstats object for each process to the given directory when the server is stopped.";
+  echo "	-P  Select the twistd plugin name [${plugin_name}]";
 
   if [ "${1-}" == "-" ]; then return 0; fi;
   exit 64;
 }
 
-while getopts 'hvsfnpkrdP:i:I:t:K:S:' option; do
+while getopts 'hvgsfnpdkrK:i:I:t:S:P:' option; do
   case "$option" in
     '?') usage; ;;
     'h') usage -; exit 0; ;;
     'v')       verbose="-v"; ;;
-    's')    setup_only="true"; ;;
     'f')   force_setup="true"; ;;
-    'n') disable_setup="true"; ;;
     'p')    print_path="true"; ;;
     'k')          kill="true"; ;;
     'r')       restart="true"; ;;
     'd')     daemonize=""; ;;
     'P')   plugin_name="${OPTARG}"; ;;
-    'i')    setup_only="true"; install="${OPTARG}"; install_flag="--root="; ;;
-    'I')    setup_only="true"; install="${wd}/build/dst"; install_flag="--root="; install_home="${OPTARG}"; ;;
     't')  service_type="${OPTARG}"; ;;
     'K')      read_key="${OPTARG}"; ;;
     'S')       profile="-p ${OPTARG}"; ;;
+    'g') do_get="true"; do_setup="false"; do_run="false"; ;;
+    's') do_get="true"; do_setup="true" ; do_run="false"; ;;
+    '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));
@@ -226,7 +230,7 @@
     exit 0;
   fi;
 
-  if ! "${setup_only}"; then
+  if "${do_run}"; then
     if [ ! -f "${config}" ]; then
       echo "Missing config file: ${config}";
       echo "You might want to start by copying the test configuration:";
@@ -275,7 +279,7 @@
 }
 
 www_get () {
-  if "${disable_setup}"; then return 0; fi;
+  if ! "${do_get}"; then return 0; fi;
 
   local name="$1"; shift;
   local path="$1"; shift;
@@ -305,7 +309,7 @@
 }
 
 svn_get () {
-  if "${disable_setup}"; then return 0; fi;
+  if ! "${do_get}"; then return 0; fi;
 
   local     name="$1"; shift;
   local     path="$1"; shift;
@@ -369,7 +373,7 @@
     local     path="$1"; shift;
     local optional="$1"; shift;
 
-    if ! "${disable_setup}" && (
+    if "${do_setup}" && (
         "${force_setup}" || [ ! -d "${path}/build/${py_platform_libdir}" ]
     ); then
       echo "";
@@ -409,7 +413,7 @@
 put_setuptools () {
     local where="$1"; shift;
 
-    if ! "${disable_setup}"; then
+    if "${do_get}"; then
       cp "${caldav}/support/setuptools-0.6c8-py2.5.egg" "${where}/";
     fi;
 }
@@ -524,7 +528,7 @@
 
 www_get "libevent" "${libevent}" http://www.monkey.org/~provos/libevent-1.4.4-stable.tar.gz
 
-if ! "${disable_setup}" && (
+if "${do_setup}" && (
   "${force_setup}" || [ ! -d "${libevent}/_root" ]
 ); then
   echo "";
@@ -542,7 +546,7 @@
 
 www_get "memcached" "${memcached}" http://www.danga.com/memcached/dist/memcached-1.2.5.tar.gz;
 
-if ! "${disable_setup}" && (
+if "${do_setup}" && (
   "${force_setup}" || [ ! -d "${memcached}/_root" ]
 ); then
   echo "";

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20080527/83a5aafe/attachment-0001.htm 


More information about the calendarserver-changes mailing list