diff options
author | rhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58> | 2008-12-23 21:24:11 +0000 |
---|---|---|
committer | rhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58> | 2008-12-23 21:24:11 +0000 |
commit | 5c7d3944cda03a29ae6349ec4bd058e405c3b8f4 (patch) | |
tree | 37edd861a5388d07f9e6b06b64c5e1d8c70412b4 /trunk/lib | |
parent | 9a8f7b53cefff0a1282d32112fcf353d06cb6d5c (diff) | |
download | simplepkg-5c7d3944cda03a29ae6349ec4bd058e405c3b8f4.tar.gz simplepkg-5c7d3944cda03a29ae6349ec4bd058e405c3b8f4.tar.bz2 |
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
Diffstat (limited to 'trunk/lib')
-rw-r--r-- | trunk/lib/common.sh | 16 |
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 # ----------------------------------------------- |