updated Makefile copyright info to use © symbol since (c) is apparently legally meani...
[monkeysphere.git] / src / share / common
index 28da3c09925fc7ccb7487a05c7c5c0e8280fa456..7bacd4e7dca30d5f9dd29bd9b0f129c6c7ac73ba 100644 (file)
@@ -530,6 +530,15 @@ gpg2authorized_keys() {
 
 ### GPG UTILITIES
 
+# script to determine if gpg version is equal to or greater than specified version
+is_gpg_version_greater_equal() {
+    local gpgVersion=$(gpg --version | head -1 | awk '{ print $3 }')
+    local latest=$(printf '%s\n%s\n' "$1" "$gpgVersion" \
+       | tr '.' ' ' | sort -g -k1 -k2 -k3 \
+       | tail -1 | tr ' ' '.')
+    [[ "$gpgVersion" == "$latest" ]]
+}
+
 # retrieve all keys with given user id from keyserver
 # FIXME: need to figure out how to retrieve all matching keys
 # (not just first N (5 in this case))
@@ -753,7 +762,7 @@ process_user_id() {
 }
 
 # output all valid keys for specified user ID literal
-keys_from_userid() {
+keys_for_userid() {
     local userID
     local noKey=
     local nKeys