From 4cf8a17cfbe2a0b2af659f4b75d16e746d976ab6 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Tue, 26 Nov 2013 13:29:41 -0200 Subject: Set .gitignore during initialization and when using tmp inside the repository --- keyringer | 1 + lib/keyringer/functions | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/keyringer b/keyringer index bdb1f6c..922f490 100755 --- a/keyringer +++ b/keyringer @@ -90,6 +90,7 @@ function keyringer_init { # Init if ! keyringer_is_git "$BASEDIR"; then keyringer_exec git "$BASEDIR" init + keyringer_git_ignore 'tmp/*' # Edit default recipients echo "Now you have to edit the default recipient configuration to be able to encrypt secrets." diff --git a/lib/keyringer/functions b/lib/keyringer/functions index a278caf..53afd1d 100755 --- a/lib/keyringer/functions +++ b/lib/keyringer/functions @@ -153,6 +153,9 @@ function keyringer_set_tmpfile { echo "Press any key to continue, Ctrl-C to abort" read key tmp="$BASEDIR/tmp" + + # Just to be sure + keyringer_git_ignore 'tmp/*' fi # Determine template @@ -163,7 +166,6 @@ function keyringer_set_tmpfile { fi mkdir -p "$tmp" - keyringer_git_ignore 'tmp/*' if [ "$2" == "-d" ]; then TMPWORK="$(mktemp -d "$template")" -- cgit v1.2.3