diff options
author | Aaron Griffin <aaronmgriffin@gmail.com> | 2008-11-22 03:31:13 +0100 |
---|---|---|
committer | Aaron Griffin <aaronmgriffin@gmail.com> | 2008-11-22 03:31:13 +0100 |
commit | a7a268356fac69c94d99315553f4d61fa2744261 (patch) | |
tree | e6f52255a077983c8f82c69b90a2d5219f888a5f | |
parent | 3606df775189459eef24fdec2bad5cab6ccc7ec6 (diff) | |
download | dbscripts-a7a268356fac69c94d99315553f4d61fa2744261.tar.gz dbscripts-a7a268356fac69c94d99315553f4d61fa2744261.tar.xz |
Add umask setting/restoring helper functions
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
-rw-r--r-- | db-functions | 10 |
1 files changed, 10 insertions, 0 deletions
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 |