summaryrefslogtreecommitdiff
path: root/scripts/functions
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2009-01-12 21:35:23 (GMT)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2009-01-12 21:35:23 (GMT)
commit83f0bec91502b303ee769bac4f2717eb122bb363 (patch)
treedabb4257ecce0491ebdf1d626d24e026a0195157 /scripts/functions
parent25c6b869cf409f5a091690f0f2ed13b78884e205 (diff)
Fix removing existing directories by chmod'ing them to be user-writeable.
/trunk/scripts/crosstool.sh | 21 10 11 0 ++++++++++----------- /trunk/scripts/functions | 7 7 0 0 +++++++ 2 files changed, 17 insertions(+), 11 deletions(-)
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