summaryrefslogtreecommitdiffstats
path: root/db-functions
diff options
context:
space:
mode:
authorAaron Griffin <aaronmgriffin@gmail.com>2008-10-21 22:06:06 +0200
committerAaron Griffin <aaronmgriffin@gmail.com>2008-10-21 22:11:24 +0200
commit23f48e65a5f4133be8a5d2883de6ffb2f4f04962 (patch)
tree2106d4d3a956424e9068e231b55c98ffc99c558c /db-functions
parent0dd49e0e02f40a1687814f15d4aea55e1cc8411a (diff)
downloaddbscripts-23f48e65a5f4133be8a5d2883de6ffb2f4f04962.tar.gz
dbscripts-23f48e65a5f4133be8a5d2883de6ffb2f4f04962.tar.xz
Add copy_helper function to ensure correct permissions
This will force all files copied back and forth to have 0664 permissions so that we can attempt to do away with this permission adjusting cron job Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
Diffstat (limited to 'db-functions')
-rw-r--r--db-functions7
1 files changed, 7 insertions, 0 deletions
diff --git a/db-functions b/db-functions
index 9df678c..a20496b 100644
--- a/db-functions
+++ b/db-functions
@@ -61,4 +61,11 @@ check_pkg_arch () { #check_pkg_arch pkgfile arch
fi
}
+# Simple helper function to ensure we always
+# have proper DB permissions
+copy_helper () { #copy_helper file dest
+ /bin/cp $1 $2 || return 1
+ /bin/chmod 664 "$(dirname $2)/$(basename $1)" || return 1
+}
+
# vim: set ts=4 sw=4 noet ft=sh: