#!/bin/bash
+set -e
+set -u
-{
- set -e
- set -u
-
+function __install_ssh_pubkey() {
MY_CMD="ssh-pubkey"
rm -f "$HOME/.local/bin/$MY_CMD"
# run the command
"$HOME/.local/bin/$MY_CMD"
}
+
+__install_ssh_pubkey
#!/bin/bash
+set -e
+set -u
-{
- set -e
- set -u
+function _ssh_pubkey() {
if [ ! -d "$HOME/.ssh" ]; then
mkdir -p "$HOME/.ssh/"
# 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"
cat "$HOME/Downloads/id_rsa.$(whoami).pub"
echo >&2 ""
}
+
+_ssh_pubkey