summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2019-11-14 15:15:56 -0300
committerSilvio Rhatto <rhatto@riseup.net>2019-11-14 15:15:56 -0300
commit7d1c32c22d7ac199797dfdd691264ebd3379a161 (patch)
tree90ec28e466e9312c00048069392b6dea8b997c88
parentefd2b4887d30fb9163bb14dffe8312e4a2097b2a (diff)
parentf4d296e14cf5d150064c10a8342bbac75b7e994e (diff)
downloadkeyringer-7d1c32c22d7ac199797dfdd691264ebd3379a161.tar.gz
keyringer-7d1c32c22d7ac199797dfdd691264ebd3379a161.tar.bz2
New upstream version 0.5.5upstream_keyringer_0.5.5
-rw-r--r--ChangeLog10
-rwxr-xr-xkeyringer2
-rwxr-xr-xlib/keyringer/actions/encrypt18
-rwxr-xr-xlib/keyringer/actions/git2
4 files changed, 29 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 1142a1a..892b99d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2019-03-25 - 0.5.5 - Silvio Rhatto <rhatto@riseup.net>
+
+ Adds COMMIT_AFTER_ENCRYPT setting
+
+ Adds PUSH_AFTER_ENCRYPT setting
+
+ Fix git parameter expansion
+
+ Fix secret name when encrypting a folder
+
2019-01-29 - 0.5.4 - Silvio Rhatto <rhatto@riseup.net>
Use --no-encrypt-to GnuPG option to strictly respect the recipients file
diff --git a/keyringer b/keyringer
index c419d35..4c3570d 100755
--- a/keyringer
+++ b/keyringer
@@ -140,7 +140,7 @@ function keyringer_dispatch {
# Config
NAME="keyringer"
-KEYRINGER_VERSION="0.5.4"
+KEYRINGER_VERSION="0.5.5"
CONFIG_VERSION="0.1"
CONFIG_BASE="$HOME/.$NAME"
CONFIG="$CONFIG_BASE/config"
diff --git a/lib/keyringer/actions/encrypt b/lib/keyringer/actions/encrypt
index 11db62c..1256374 100755
--- a/lib/keyringer/actions/encrypt
+++ b/lib/keyringer/actions/encrypt
@@ -95,9 +95,14 @@ if [ "$UNENCRYPTED_FILE" != "-" ] && [ -d "$UNENCRYPTED_FILE" ]; then
# Time to go recursive
BASEPATH="`basename $FILE .asc`"
FILEPATH="`dirname "$UNENCRYPTED_FILE"`"
+
+ if [ "$FILEPATH" == "." ]; then
+ FILEPATH="$(cd `dirname "$UNENCRYPTED_FILE"` &> /dev/null & pwd)"
+ fi
+
find $UNENCRYPTED_FILE | while read file; do
if [ ! -d "$file" ]; then
- dir="`dirname "$file" | sed -e "s|^$FILEPATH|$BASEPATH|g"`"
+ dir="`dirname "$file" | sed -e "s|^$UNENCRYPTED_FILE|$BASEPATH|" -e "s|^$FILEPATH|$BASEPATH|"`"
keyringer_get_new_file `basename "$file"`
keyringer_encrypt "$dir/$FILE" $file
fi
@@ -124,5 +129,16 @@ if [ -d "$BASEDIR/.git" ]; then
keyringer_exec git "$BASEDIR" add "keys/$FILE"
fi
+# Optional commit depending on the value of this setting
+if [ "$COMMIT_AFTER_ENCRYPT" == "yes" ]; then
+ FILE="`echo $FILE | sed -e 's|/./||'`"
+ echo Changes for keys/$FILE | keyringer_exec git "$BASEDIR" commit -F -
+fi
+
+# Optional push depending on the value of this setting
+if [ "$PUSH_AFTER_ENCRYPT" == "yes" ]; then
+ keyringer_exec git "$BASEDIR" push
+fi
+
# Done
exit "$?"
diff --git a/lib/keyringer/actions/git b/lib/keyringer/actions/git
index f2cb684..1c61e4e 100755
--- a/lib/keyringer/actions/git
+++ b/lib/keyringer/actions/git
@@ -14,5 +14,5 @@ CWD="`pwd`"
shift
# Run git command
-mkdir -p "$BASEDIR" && cd "$BASEDIR" && git $*
+mkdir -p "$BASEDIR" && cd "$BASEDIR" && git "$@"
cd "$CWD"