[CalendarServer-dev] [CalendarServer] #322: On Linux, 'run -s' tries to use 'md5' instead of 'md5sum'

CalendarServer trac at macosforge.org
Mon Feb 9 16:02:08 PST 2009


#322: On Linux, 'run -s' tries to use 'md5' instead of 'md5sum'
--------------------------------+-------------------------------------------
 Reporter:  jacobg23@…          |       Owner:  wsanchez@…        
     Type:  Defect              |      Status:  new               
 Priority:  5: Not set          |   Milestone:                    
Component:  Calendar Server     |    Severity:  Other             
 Keywords:                      |  
--------------------------------+-------------------------------------------
 If you try to build on Linux you'll get warnings about the 'md5'
 executable not existing.  The following patch fixes it.  This is,
 admittedly, rather low-priority but I thought I'd send you the patch:

 Index: run
 ===================================================================
 --- run (revision 3652)
 +++ run (working copy)
 @@ -48,6 +48,12 @@
    cache_deps="${CALENDARSERVER_CACHE_DEPS}";
  fi;

 +if [ "$(uname -s)" == "Darwin" ]; then
 +    md5="md5"
 +else
 +    md5="md5sum"
 +fi
 +
  usage ()
  {
    program="$(basename "$0")";
 @@ -318,7 +324,7 @@
      if [ -n "${cache_deps}" ]; then
        mkdir -p "${cache_deps}";

 -      cache_file="${cache_deps}/${name}-$(echo "${url}" | md5)-$(basename
 "${url}")";
 +      cache_file="${cache_deps}/${name}-$(echo "${url}" |
 ${md5})-$(basename "${url}")";

        if [ ! -f "${cache_file}" ]; then
         echo "Downloading ${name}...";
 @@ -401,7 +407,7 @@
      }

      if [ "${revision}" != "HEAD" ] && [ -n "${cache_deps}" ]; then
 -      local cache_file="${cache_deps}/${name}-$(echo "${uri}" |
 md5)@r${revision}.tgz";
 +      local cache_file="${cache_deps}/${name}-$(echo "${uri}" |
 ${md5})@r${revision}.tgz";

        mkdir -p "${cache_deps}";

-- 
Ticket URL: <http://trac.calendarserver.org/ticket/322>
CalendarServer </>
HTTP/WebDAV/CalDAV Server


More information about the calendarserver-dev mailing list