From 653cfb618ed7a9fb258db26209c6796fdb375468 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 97fc059..46447bf 100755 --- a/bin/_blackbox_common.sh +++ b/bin/_blackbox_common.sh @@ -425,9 +425,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}" ;;