[CalendarServer-changes] [14876] CalendarServer/trunk/bin/caldavd
source_changes at macosforge.org
source_changes at macosforge.org
Thu Jun 4 11:52:34 PDT 2015
Revision: 14876
http://trac.calendarserver.org//changeset/14876
Author: wsanchez at apple.com
Date: 2015-06-04 11:52:34 -0700 (Thu, 04 Jun 2015)
Log Message:
-----------
Match _py.sh
Modified Paths:
--------------
CalendarServer/trunk/bin/caldavd
Modified: CalendarServer/trunk/bin/caldavd
===================================================================
--- CalendarServer/trunk/bin/caldavd 2015-06-04 18:44:40 UTC (rev 14875)
+++ CalendarServer/trunk/bin/caldavd 2015-06-04 18:52:34 UTC (rev 14876)
@@ -33,22 +33,26 @@
child_reactor=""
extra="";
-py_version ()
-{
- local python="$1"; shift
+py_version () {
+ local python="$1"; shift;
echo "$("${python}" -c "from distutils.sysconfig import get_python_version; print get_python_version()")";
}
-try_python ()
-{
- local python="$1"; shift
+try_python () {
+ local python="$1"; shift;
- if [ -z "${python}" ]; then return 1; fi;
+ if [ -z "${python}" ]; then
+ return 1;
+ fi;
- if ! type "${python}" > /dev/null 2>&1; then return 1; fi;
+ if ! type "${python}" > /dev/null 2>&1; then
+ return 1;
+ fi;
+
local py_version="$(py_version "${python}")";
- if [ $(echo ${py_version} | tr -d .) -lt "24" ]; then return 1; fi;
-
+ if [ "$(echo "${py_version}" | sed 's|\.||')" -lt "25" ]; then
+ return 1;
+ fi;
return 0;
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20150604/7c9984b7/attachment.html>
More information about the calendarserver-changes
mailing list