diff options
Diffstat (limited to 'scripts/functions')
-rw-r--r-- | scripts/functions | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/scripts/functions b/scripts/functions index e991a189..a4e8cd07 100644 --- a/scripts/functions +++ b/scripts/functions @@ -252,7 +252,17 @@ CT_DoForceRmdir() { local mode for dir in "${@}"; do [ -d "${dir}" ] || continue - mode="$(stat -c '%a' "$(dirname "${dir}")")" + case "$CT_SYS_OS" in + Linux) + mode="$(stat -c '%a' "$(dirname "${dir}")")" + ;; + Darwin|*BSD) + mode="$(stat -f '%Lp' "$(dirname "${dir}")")" + ;; + *) + CT_Abort "Unhandled host OS $CT_SYS_OS" + ;; + esac CT_DoExecLog ALL chmod u+w "$(dirname "${dir}")" CT_DoExecLog ALL chmod -R u+w "${dir}" CT_DoExecLog ALL rm -rf "${dir}" |