aboutsummaryrefslogtreecommitdiff
path: root/trunk/lib/common.sh
diff options
context:
space:
mode:
Diffstat (limited to 'trunk/lib/common.sh')
-rw-r--r--trunk/lib/common.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/trunk/lib/common.sh b/trunk/lib/common.sh
index 9a123aa..39199ac 100644
--- a/trunk/lib/common.sh
+++ b/trunk/lib/common.sh
@@ -545,6 +545,22 @@ function get_group {
}
+function is_writable_folder {
+
+ # check if a folder is writable
+ # usage: is_writable_folder <folder>
+
+ local tmpfile folder="$1"
+
+ if mkdir -p $folder &> /dev/null && tmpfile=`mktemp $folder/is_writable_folder.XXXXXX`; then
+ rm -f $tmpfile
+ return 0
+ else
+ return 1
+ fi
+
+}
+
# -----------------------------------------------
# subversion functions
# -----------------------------------------------