summaryrefslogtreecommitdiff
path: root/scripts/functions
diff options
context:
space:
mode:
authorAlexey Neyman <stilor@att.net>2017-02-12 22:23:16 (GMT)
committerAlexey Neyman <stilor@att.net>2017-02-13 06:02:28 (GMT)
commitf9bec4ed7c4540de73c82c94053f975c5c7c29e4 (patch)
tree3d9e2a73ebca96ed9bd5a616658e018ecefc4920 /scripts/functions
parent41ba1d99c8801cf27bf59daf3663eee89156afa0 (diff)
stat: determine whether it is BSD or GNU flavor
Seems like MacOS may have either in the path. Signed-off-by: Alexey Neyman <stilor@att.net>
Diffstat (limited to 'scripts/functions')
-rw-r--r--scripts/functions8
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/functions b/scripts/functions
index 65ce498..84054d5 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -567,15 +567,15 @@ CT_DoForceRmdir() {
local mode
for dir in "${@}"; do
[ -d "${dir}" ] || continue
- case "$CT_SYS_OS" in
- Linux|CYGWIN*)
+ case "${CT_CONFIGURE_has_stat_flavor_GNU},${CT_CONFIGURE_has_stat_flavor_BSD}" in
+ y,*)
mode="$(stat -c '%a' "$(dirname "${dir}")")"
;;
- Darwin|*BSD)
+ *,y)
mode="$(stat -f '%Lp' "$(dirname "${dir}")")"
;;
*)
- CT_Abort "Unhandled host OS $CT_SYS_OS"
+ CT_Abort "Unknown stat format options"
;;
esac
CT_DoExecLog ALL chmod u+w "$(dirname "${dir}")"