X-Git-Url: https://git.josue.xyz/?a=blobdiff_plain;f=ssh-utils%2Fssh-pubkey.sh;fp=ssh-utils%2Fssh-pubkey.sh;h=40b09faa281dedd74d47ef6d870fd0bee9ce958c;hb=c09256897154fba40911a98e88e559d595c56293;hp=d15cac53ef4b88fa04ab6ac7e86b766c0fd31213;hpb=cbe59ba54729dfde1e4c8512133379055f7f001e;p=webi-installers%2F.git diff --git a/ssh-utils/ssh-pubkey.sh b/ssh-utils/ssh-pubkey.sh index d15cac5..40b09fa 100644 --- a/ssh-utils/ssh-pubkey.sh +++ b/ssh-utils/ssh-pubkey.sh @@ -1,8 +1,8 @@ #!/bin/bash +set -e +set -u -{ - set -e - set -u +function _ssh_pubkey() { if [ ! -d "$HOME/.ssh" ]; then mkdir -p "$HOME/.ssh/" @@ -32,6 +32,7 @@ # TODO use the comment (if any) for the name of the file echo >&2 "" + #shellcheck disable=SC2088 echo >&2 "~/Downloads/id_rsa.$(whoami).pub": echo >&2 "" rm -f "$HOME/Downloads/id_rsa.$(whoami).pub" @@ -39,3 +40,5 @@ cat "$HOME/Downloads/id_rsa.$(whoami).pub" echo >&2 "" } + +_ssh_pubkey