From a7a268356fac69c94d99315553f4d61fa2744261 Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Fri, 21 Nov 2008 20:31:13 -0600 Subject: Add umask setting/restoring helper functions Signed-off-by: Aaron Griffin --- db-functions | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'db-functions') diff --git a/db-functions b/db-functions index 11ab422..8c8c667 100644 --- a/db-functions +++ b/db-functions @@ -19,6 +19,16 @@ source_makepkg () { fi } +UMASK="" +set_umask () { + UMASK="$(umask)" + umask 002 +} + +restore_umask () { + umask $UMASK +} + repo_lock () { #repo_lock repo-name arch LOCKFILE="$TMPDIR/.repolock.$1.$2" if [ -f "$LOCKFILE" ]; then -- cgit v1.2.3-24-g4f1b