From 5c7d3944cda03a29ae6349ec4bd058e405c3b8f4 Mon Sep 17 00:00:00 2001 From: rhatto Date: Tue, 23 Dec 2008 21:24:11 +0000 Subject: mkbuild: adding --update-manifest and other changes (see CHANGELOG) git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@707 04377dda-e619-0410-9926-eae83683ac58 --- trunk/lib/common.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'trunk/lib') 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 + + 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 # ----------------------------------------------- -- cgit v1.2.3