summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorrhatto <rhatto@ratatosk.fluxo.info>2014-03-22 16:47:52 -0300
committerrhatto <rhatto@ratatosk.fluxo.info>2014-03-22 16:47:52 -0300
commit89005b548f9bc87b9a16f43ac40f12e4280c860f (patch)
treef8a53cfa1312defc42b371ae06f6194fe3445463 /lib
parent307fadff79b8f725d4ab9e41f270c024c05a0ef9 (diff)
parentfc9954384ee5543d742395c5b9245e83d6e9fd07 (diff)
downloadkeyringer-89005b548f9bc87b9a16f43ac40f12e4280c860f.tar.gz
keyringer-89005b548f9bc87b9a16f43ac40f12e4280c860f.tar.bz2
Imported Upstream version 0.3.3upstream_keyringer_0.3.3
Diffstat (limited to 'lib')
-rwxr-xr-xlib/keyringer/actions/find2
-rwxr-xr-xlib/keyringer/functions15
2 files changed, 8 insertions, 9 deletions
diff --git a/lib/keyringer/actions/find b/lib/keyringer/actions/find
index 9b18d66..21afc7a 100755
--- a/lib/keyringer/actions/find
+++ b/lib/keyringer/actions/find
@@ -15,5 +15,5 @@ shift
ARGS="`echo "$*" | sed -e "s|^/*||"`"
# Run find command
-cd "$KEYDIR/$RELATIVE_PATH" && find | grep -i "$ARGS" | sed -e 's|^./||g'
+cd "$KEYDIR/$RELATIVE_PATH" && find -iname "*$ARGS*" | sed -e 's|^./||g'
cd "$CWD"
diff --git a/lib/keyringer/functions b/lib/keyringer/functions
index 832385e..f1af951 100755
--- a/lib/keyringer/functions
+++ b/lib/keyringer/functions
@@ -429,10 +429,10 @@ function keyringer_get_file {
elif [ ! -f "$KEYDIR/$FILE" ]; then
# Try to find a similar file
count=0
- candidates=(`keyringer_exec find "$BASEDIR" | grep -i "$1" | grep -e '.asc$'`)
+ candidates=(`keyringer_exec find "$BASEDIR" "$1*.asc"`)
if [ ! -z "$candidates" ]; then
- echo "Could not find exact match \"$1\", please chose one of the following secrets:"
+ echo "Could not find exact match for \"$1\", please choose one of the following secrets:"
echo ""
for candidate in ${candidates[@]}; do
@@ -544,7 +544,7 @@ function keyringer_check_repository {
# Git maintenance operations
echo "Running git maintenance operations..."
keyringer_exec git "$BASEDIR" fsck
- keyringer_exec git "$BASEDIR" gc --prune=all
+ keyringer_exec git "$BASEDIR" gc
echo ""
# Sync the repository
@@ -572,7 +572,7 @@ function keyringer_refresh_keys {
local recipient="$1"
echo "Trying to refresh key $recipient..."
- gpg --batch --refresh-keys "$recipient"
+ gpg --batch --recv-keys "$recipient"
}
# Check recipient size
@@ -581,7 +581,7 @@ function keyringer_check_recipient_size {
local size=$(echo "$recipient" | wc -c)
if (( $size < 41 )); then
- echo "Fatal: please set the full GPG signature hash for key ID $recipient:"
+ echo "Fatal: please set the full OpenPGP fingerprint for key ID $recipient:"
cat <<-EOF
Please provide a full OpenPGP fingerprint, for example:
@@ -652,7 +652,6 @@ function keyringer_check_recipients {
# Check key expiration
keyringer_check_expiration "$recipient"
-
done
}
@@ -671,8 +670,8 @@ function keyringer_check_recipient_key {
fi
echo ""
else
- echo "Fatal: no such key $recipient on your GPG keyring."
- echo "Please check for this key or fix the recipient file."
+ echo "Fatal: no such key $recipient on your GnuPG keyring."
+ echo "Please retrieve this key yourself or fix the recipient file."
exit 1
fi