apple / ccs-calendarserver

The Calendar and Contacts Server.
https://www.calendarserver.org
Apache License 2.0
486 stars 136 forks source link

On Linux, 'run -s' tries to use 'md5' instead of 'md5sum' #257

Closed macosforgebot closed 15 years ago

macosforgebot commented 15 years ago

jacobg23@… originally submitted this as ticket:322


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}";

macosforgebot commented 15 years ago

@wsanchez originally submitted this as comment:1:⁠ticket:322


Fair point. Try r3679 and see if that works for you. I tried to just check for any of a number of possible hashing command rather than trying to guess based on platform name.