Commit 2b3b31d4 authored by Niels Möller's avatar Niels Möller
Browse files

Fixed bash-isms, don't use "if !", use "$HOME"

rather than "~".

Rev: src/lsh-authorize:1.7
parent 058c15af
...@@ -37,8 +37,8 @@ create_dir () { ...@@ -37,8 +37,8 @@ create_dir () {
} }
# Create directories # Create directories
create_dir ~/.lsh 0700 create_dir $HOME/.lsh 0700
create_dir ~/.lsh/authorized_keys_sha1 0700 create_dir $HOME/.lsh/authorized_keys_sha1 0700
if type sexp-conv &>/dev/null ; then if type sexp-conv &>/dev/null ; then
SEXP_CONV=sexp-conv SEXP_CONV=sexp-conv
...@@ -46,7 +46,7 @@ else ...@@ -46,7 +46,7 @@ else
SEXP_CONV=./sexp-conv SEXP_CONV=./sexp-conv
fi fi
if ! type $SEXP_CONV &>/dev/null; then if type $SEXP_CONV &>/dev/null; then : ; else
echo "Can't find the sexp-conv program" echo "Can't find the sexp-conv program"
exit 1 exit 1
fi fi
...@@ -56,7 +56,7 @@ while [ $# != 0 ]; do ...@@ -56,7 +56,7 @@ while [ $# != 0 ]; do
if [ -z $hash ] ; then if [ -z $hash ] ; then
echo $0: File $1 not found. echo $0: File $1 not found.
else else
$SEXP_CONV < $1 -f canonical --once > ~/.lsh/authorized_keys_sha1/$hash $SEXP_CONV < $1 -f canonical --once > $HOME/.lsh/authorized_keys_sha1/$hash
fi fi
shift shift
done done
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