]> gitweb.fluxo.info Git - keyringer.git/commitdiff
Comments
authorSilvio Rhatto <rhatto@riseup.net>
Wed, 11 Dec 2013 00:43:14 +0000 (22:43 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Wed, 11 Dec 2013 00:43:14 +0000 (22:43 -0200)
lib/keyringer/actions/commands
lib/keyringer/actions/edit
lib/keyringer/actions/encrypt
lib/keyringer/actions/options
lib/keyringer/actions/preferences
lib/keyringer/actions/recipients
lib/keyringer/actions/recrypt
lib/keyringer/actions/teardown
lib/keyringer/actions/tree
lib/keyringer/actions/usage

index 26056664fc25e403a542ee2f900427cef06b61a3..cb49c02424d9ac3abed029f422c7f3591e78a9c8 100755 (executable)
@@ -7,4 +7,5 @@
 LIB="`dirname $0`/../functions"
 source "$LIB" || exit 1
 
+# Dispatch
 keyringer_show_actions
index 9a3e4881929c46dc96bfdf4f7815f41af6e3e428..5f31aa0c696154e4ede75adb9f6897564ee0787b 100755 (executable)
@@ -24,6 +24,7 @@ keyringer_set_tmpfile $BASENAME.$EXTENSION
 # Decrypt the information to the file
 $GPG --yes -o "$TMPWORK" --use-agent -d "$KEYDIR/$FILE"
 
+# Action check
 if [ "$BASENAME" == "edit" ]; then
   APP="$EDITOR"
 elif [ "$BASENAME" == "open" ]; then
index 0a40bc18b92988f6b895365dc93a4845279802da..e9bf4534c7ccb3a0ade182d5fad7fe54bc9c26d8 100755 (executable)
@@ -106,12 +106,13 @@ else
   keyringer_encrypt $FILE $UNENCRYPTED_FILE
 fi
 
+# Check exit status
 err="$?"
-
 if [ "$err" != "0" ]; then
   exit "$err"
 fi
 
+# Wipe information
 if [ "$UNENCRYPTED_FILE" != "-" ]; then
   echo "Done. PLEASE WIPE the non-encrypted $UNENCRYPTED_FILE."
 fi
@@ -121,4 +122,5 @@ if [ -d "$BASEDIR/.git" ]; then
   keyringer_exec git "$BASEDIR" add "keys/$FILE"
 fi
 
+# Done
 exit "$?"
index 8508aeaa2769f4313a0ccdd11daebbb9e17e0331..3bf0e4306a7d7199ef16994a1a35273e6bab15a2 100755 (executable)
@@ -17,6 +17,7 @@ if [ ! -e "$OPTIONS" ]; then
   keyringer_exec git "$BASEDIR" add config/options
 fi
 
+# Dispatch
 if [ "$COMMAND" == "ls" ]; then
   cat "$OPTIONS"
 elif [ "$COMMAND" == "edit" ]; then
index e82848df80fc326935162f973f37b5fcc2f0bfd0..f7507a79048b469e81cb2ca292cd89bb4e626c38 100755 (executable)
@@ -7,8 +7,10 @@
 LIB="`dirname $0`/../functions"
 source "$LIB" || exit 1
 
+# Options
 COMMAND="$2"
 
+# Syntax check
 if [ -z "$COMMAND" ]; then
   echo "Usage: keyringer <keyring> preferences <command> [arguments]"
   echo "Available commands:"
@@ -24,6 +26,7 @@ if [ ! -e "$PREFERENCES" ]; then
   touch "$PREFERENCES"
 fi
 
+# Dispatch
 if [ "$COMMAND" == "ls" ]; then
   cat "$PREFERENCES"
 elif [ "$COMMAND" == "edit" ]; then
index 7093a6b78157310c9155c4dc20f5496a6169b12c..414978652f249c22da31e38d139bd7ab112836ef 100755 (executable)
@@ -13,6 +13,7 @@ keyringer_get_command "$2"
 # Set recipients file
 keyringer_set_new_recipients "$3"
 
+# Syntax check and dispatcher
 if [ "$COMMAND" == "ls" ]; then
   if [ ! -z "$3" ]; then
     if [ -e "$RECIPIENTS_FILE" ]; then
index 014fef71539774368473cc746f425577f858c2dd..696399be63d014f32144879b760ffe07082ff43c 100755 (executable)
@@ -7,6 +7,7 @@
 LIB="`dirname $0`/../functions"
 source "$LIB" || exit 1
 
+# Recrypt a single secret
 function keyringer_recrypt {
   # Get file
   keyringer_get_file "$1"
@@ -34,6 +35,7 @@ function keyringer_recrypt {
   echo "$recrypted" > "$KEYDIR/$FILE"
 }
 
+# Syntax check and dispatcher
 if [ ! -z "$2" ]; then
   keyringer_recrypt $2
 else
index 3d33da4b5bb74e49e77683b19a9c82e3ade16ab9..64da740dea68fff951bbfcc3ad97774f0bdb5561 100755 (executable)
@@ -10,6 +10,7 @@ source "$LIB" || exit 1
 # Options
 CONFIRM="$2"
 
+# Confirmation
 if [ -z "$CONFIRM" ] || [ "$CONFIRM" != "-y" ]; then
   echo "WARNING: about to remove the LOCAL copy of $KEYRING"
   echo "WARNING: This will irrevocably destroy $KEYDIR"
index a2e272da7360dd2f9291890c146961df5e107a3b..8f9d7cda7b51282df86b2f272800e9886785e00a 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/bash
 #
-# List keys.
+# List keys, tree version.
 #
 
 # Thanks http://www.centerkey.com/tree/
index e3369cc05bb864edf33bb9f55352798956fc4597..2ca7639dd4f6e6171234a1974b85b68ce76d6d7e 100755 (executable)
@@ -7,4 +7,5 @@
 LIB="`dirname $0`/../functions"
 source "$LIB" || exit 1
 
+# Dispatch
 keyringer_usage $KEYRING