aboutsummaryrefslogtreecommitdiff
path: root/lib/keyringer/functions
diff options
context:
space:
mode:
Diffstat (limited to 'lib/keyringer/functions')
-rwxr-xr-xlib/keyringer/functions9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/keyringer/functions b/lib/keyringer/functions
index b39b8ec..40e13aa 100755
--- a/lib/keyringer/functions
+++ b/lib/keyringer/functions
@@ -118,13 +118,16 @@ function keyringer_set_tmpfile {
exit 1
fi
+ # Set base temp folder
+ local tmp="$BASEDIR/tmp"
+
if [ -z "$1" ]; then
- template="$BASEDIR/tmp/keyringer.XXXXXXXXXX"
+ template="$tmp/keyringer.XXXXXXXXXX"
else
- template="$BASEDIR/tmp/$1.XXXXXXXXXX"
+ template="$tmp/XXXXXXXXXX.$1"
fi
- mkdir -p "$BASEDIR/tmp"
+ mkdir -p "$tmp"
keyringer_git_ignore 'tmp/*'
if [ "$2" == "-d" ]; then