summaryrefslogtreecommitdiff
path: root/scripts/functions
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/functions')
-rw-r--r--scripts/functions7
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/functions b/scripts/functions
index c68654c..5bf6b3d 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -242,6 +242,13 @@ CT_MktempDir() {
return 0
}
+# Removes one or more directories, even if it is read-only
+# Usage: CT_DoForceRmdir dir [...]
+CT_DoForceRmdir() {
+ CT_DoExecLog ALL chmod -R u+w "${@}"
+ CT_DoExecLog ALL rm -rf "${@}"
+}
+
# Echoes the specified string on stdout until the pipe breaks.
# Doesn't fail
# $1: string to echo