[CalendarServer-changes] [850] CalendarServer/trunk/testcaldav

source_changes at macosforge.org source_changes at macosforge.org
Mon Dec 18 17:20:21 PST 2006


Revision: 850
          http://trac.macosforge.org/projects/calendarserver/changeset/850
Author:   wsanchez at apple.com
Date:     2006-12-18 17:20:21 -0800 (Mon, 18 Dec 2006)

Log Message:
-----------
Take args

Modified Paths:
--------------
    CalendarServer/trunk/testcaldav

Modified: CalendarServer/trunk/testcaldav
===================================================================
--- CalendarServer/trunk/testcaldav	2006-12-19 01:19:33 UTC (rev 849)
+++ CalendarServer/trunk/testcaldav	2006-12-19 01:20:21 UTC (rev 850)
@@ -31,31 +31,33 @@
 
 usage ()
 {
-    program="$(basename "$0")";
-    echo "Usage: ${program} [-v] [-d docroot] [-s serverinfo]";
-    echo "Options:";
-    echo "        -h  Print this help and exit";
-    echo "        -d  Set the document root";
-    echo "        -s  Set the serverinfo.xml";
-    echo "        -v  Verbose.";
+  program="$(basename "$0")";
+  echo "Usage: ${program} [-v] [-d docroot] [-s serverinfo]";
+  echo "Options:";
+  echo "        -h  Print this help and exit";
+  echo "        -d  Set the document root";
+  echo "        -s  Set the serverinfo.xml";
+  echo "        -v  Verbose.";
 
-    if [ "${1-}" == "-" ]; then return 0; fi;
-    exit 64;
+  if [ "${1-}" == "-" ]; then return 0; fi;
+  exit 64;
 }
 
 while getopts 'hvd:s:' option; do
-    case "$option" in 
-        '?') usage; ;;
-        'h') usage -; exit 0; ;;
-        'd') documentroot="${OPTARG}"; ;;
-        's')   serverinfo="${OPTARG}"; ;;
-        'v')      verbose="v"; ;;
-    esac;
+  case "$option" in 
+    '?') usage; ;;
+    'h') usage -; exit 0; ;;
+    'd') documentroot="${OPTARG}"; ;;
+    's')   serverinfo="${OPTARG}"; ;;
+    'v')      verbose="v"; ;;
+  esac;
 done;
 
 shift $((${OPTIND} - 1));
 
-if [ $# != 0 ]; then usage "Unrecognized arguments:" "$@"; fi;
+if [ $# == 0 ]; then
+  set - "--all";
+fi;
 
 ##
 # Do The Right Thing
@@ -71,4 +73,4 @@
 
 cd "${documentroot}" && python "makelargecalendars.py";
 
-cd "${cdt}" && python testcaldav.py -s "${serverinfo}" --all;
+cd "${cdt}" && python testcaldav.py -s "${serverinfo}" "$@";

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20061218/2d65b211/attachment.html


More information about the calendarserver-changes mailing list