summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Griffin <aaronmgriffin@gmail.com>2008-11-23 07:20:39 +0100
committerAaron Griffin <aaronmgriffin@gmail.com>2008-11-23 07:20:39 +0100
commite27f2f70a4a6490abef64c66b7a74915f2d3e2e5 (patch)
treedc67c551af0ea0c30d01ec09b366a9414c28517f
parente4da6b3a2f2ba96e6f1ee84758519078c3efc779 (diff)
downloaddbscripts-e27f2f70a4a6490abef64c66b7a74915f2d3e2e5.tar.gz
dbscripts-e27f2f70a4a6490abef64c66b7a74915f2d3e2e5.tar.xz
Ensure we keep track of our initial umask
If we call set_umask more than once, make sure we don't overwrite our initial umask, so we can restore it right Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
-rw-r--r--db-functions2
1 files changed, 1 insertions, 1 deletions
diff --git a/db-functions b/db-functions
index ae1a171..b196d57 100644
--- a/db-functions
+++ b/db-functions
@@ -21,7 +21,7 @@ source_makepkg () {
UMASK=""
set_umask () {
- UMASK="$(umask)"
+ [ "$UMASK" == "" ] && UMASK="$(umask)"
umask 002
}