diff options
author | Daniel Kahn Gillmor <dkg@fifthhorseman.net> | 2008-08-16 10:45:49 -0400 |
---|---|---|
committer | Daniel Kahn Gillmor <dkg@fifthhorseman.net> | 2008-08-16 10:45:49 -0400 |
commit | df0e87db1b2f8a8c762d1a1f9ce3c7cd22845b46 (patch) | |
tree | 326254a47634c2ba45fcde7e3cb00023d4eec955 /src/common | |
parent | ae661bf9fd9ce62069a99bb9de16df8b44beee8a (diff) | |
parent | 1a17d5082447dd76f52df929bfe2f0855512c9f9 (diff) |
Merge commit 'jrollins/master'
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -69,20 +69,20 @@ file_hash() { md5sum "$1" 2> /dev/null } -# convert escaped characters from gpg output back into original -# character -# FIXME: undo all escape character translation in with-colons gpg output -unescape() { - echo "$1" | sed 's/\\x3a/:/g' +# convert escaped characters in pipeline from gpg output back into +# original character +# FIXME: undo all escape character translation in with-colons gpg +# output +gpg_unescape() { + sed 's/\\x3a/:/g' } -# convert nasty chars into gpg-friendly form +# convert nasty chars into gpg-friendly form in pipeline # FIXME: escape everything, not just colons! -escape() { - echo "$1" | sed 's/:/\\x3a/g' +gpg_escape() { + sed 's/:/\\x3a/g' } - # remove all lines with specified string from specified file remove_line() { local file @@ -405,7 +405,7 @@ process_user_id() { continue fi # if the user ID does not match, skip - if [ "$(unescape "$uidfpr")" != "$userID" ] ; then + if [ "$(echo "$uidfpr" | gpg_unescape)" != "$userID" ] ; then continue fi # if the user ID validity is not ok, skip |