From bd0fcd181cdc583c1b04e21eb53f0dbfceee2817 Mon Sep 17 00:00:00 2001 From: Tino Breddin Date: Fri, 20 Jan 2017 23:12:57 +0100 Subject: [PATCH] [FreeBSD] Fix use of chmod (#180) LGTM Thanks for the fix! --- bin/_blackbox_common.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/_blackbox_common.sh b/bin/_blackbox_common.sh index 3d061fc..45a3f0f 100755 --- a/bin/_blackbox_common.sh +++ b/bin/_blackbox_common.sh @@ -390,9 +390,12 @@ function md5sum_file() { function cp_permissions() { # Copy the perms of $1 onto $2 .. end. case $(uname -s) in - Darwin | FreeBSD ) + Darwin ) chmod $( stat -f '%p' "$1" ) "${@:2}" ;; + FreeBSD ) + chmod $( stat -f '%p' "$1" | sed -e "s/^100//" ) "${@:2}" + ;; Linux | CYGWIN* | MINGW* ) chmod --reference "$1" "${@:2}" ;;