]> arthur.barton.de Git - netdata.git/commitdiff
use command md5 when md5sum is not there - to support freebsd
authorCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Sat, 4 Mar 2017 21:52:13 +0000 (23:52 +0200)
committerCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Sat, 4 Mar 2017 21:52:13 +0000 (23:52 +0200)
netdata-installer.sh

index b078ac6d5f46486ed73fb433ae4a49f6e4add4c4..9957e95b59003343f34947ef49b62f5a57cfbd85 100755 (executable)
@@ -131,7 +131,7 @@ For the plugins, you will at least need:
 USAGE
 }
 
-md5sum="$(which md5sum 2>/dev/null || command -v md5sum 2>/dev/null)"
+md5sum="$(which md5sum 2>/dev/null || command -v md5sum 2>/dev/null || command -v md5 2>/dev/null)"
 get_git_config_signatures() {
     local x s file md5
 
@@ -147,7 +147,7 @@ get_git_config_signatures() {
             for c in $(git log --follow "conf.d/${x}" | grep ^commit | cut -d ' ' -f 2)
             do
                     git checkout ${c} "conf.d/${x}" || continue
-                    s="$(cat "conf.d/${x}" | md5sum | cut -d ' ' -f 1)"
+                    s="$(cat "conf.d/${x}" | ${md5sum} | cut -d ' ' -f 1)"
                     echo >>configs.signatures.tmp "${s}:${x}"
                     echo "    ${s}"
             done