Commit 0da3b3b9 authored by Niels Möller's avatar Niels Möller
Browse files

* src/ssh-conv: Don't look for lsh-decode-key in the current

directory. Added command line options --help, --usage,
--decode-with.

Rev: src/ssh-conv:1.6
parent f383c692
#! /bin/sh
if type lsh-decode-key ; then
SSH_CONV=lsh-decode-key
else
SSH_CONV=./lsh-decode-key
fi
SSH_CONV="lsh-decode-key"
while [ $# -ge 1 ]; do
case "$1" in
--usage|--help)
echo "Usage: ssh-conv [OPTION]"
echo "Converts an OpenSSH style public key to spki format."
echo
echo " --decode-with PROGRAM-NAME The program to use for the"
echo " actual decoding."
echo
echo "Report bugs to <bug-lsh@gnu.org>."
exit 0
;;
--decode-with)
shift
SSH_CONV=$1
;;
*)
echo "ssh-conv: unrecognized option \`$1'"
echo "Try \`ssh-conv --help' or \`ssh-conv --usage' for more information."
exit 1
;;
esac
shift
done
if ! type $SSH_CONV ; then
echo "Can't find the lsh-decode-key program"
if ! type "$SSH_CONV" &> /dev/null; then
echo "ssh-conv: Can't find the program \`$SSH_CONV'."
exit 1
fi
......@@ -19,6 +40,3 @@ awk 'BEGIN { state = 0; }
/^ssh-dss/ { print $2; }
/^ssh-rsa/ { print $2; }' \
| $SSH_CONV -b
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment