]> gitweb.fluxo.info Git - keyringer.git/commitdiff
Set .gitignore during initialization and when using tmp inside the repository
authorSilvio Rhatto <rhatto@riseup.net>
Tue, 26 Nov 2013 15:29:41 +0000 (13:29 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Tue, 26 Nov 2013 15:29:41 +0000 (13:29 -0200)
keyringer
lib/keyringer/functions

index bdb1f6ce9dfef0af3efac770029165ef65cb0b28..922f490d39ca2fa01b427e71d25e2c785077fb7d 100755 (executable)
--- 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."
index a278cafe793bf05137f1a693ba128e97b7ff883f..53afd1df429f458832cb4aec93072917284b3918 100755 (executable)
@@ -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")"