From 83f0bec91502b303ee769bac4f2717eb122bb363 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Mon, 12 Jan 2009 21:35:23 +0000 Subject: 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(-) --- scripts/functions | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'scripts/functions') diff --git a/scripts/functions b/scripts/functions index c68654ce..5bf6b3dc 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 -- cgit v1.2.3