Skip to content

Commit

Permalink
[FreeBSD] Fix use of chmod (#180)
Browse files Browse the repository at this point in the history
LGTM

Thanks for the fix!
  • Loading branch information
tolbrino authored and Tom Limoncelli committed Jan 20, 2017
1 parent 818db98 commit bd0fcd1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bin/_blackbox_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
;;
Expand Down

0 comments on commit bd0fcd1

Please sign in to comment.