X-Git-Url: https://git.josue.xyz/?a=blobdiff_plain;f=ssh-pubkey%2Finstall.sh;h=6f2ef5e11bad41c9497ae2183da7df13ba1c077e;hb=91512157ab426c87e0a82b594620e90e324b23a3;hp=db9dc3f8c1c1abb187c816c495dce7ae1fd436bf;hpb=46445e9382905a52e770d44191235be179616049;p=webi-installers%2F.git diff --git a/ssh-pubkey/install.sh b/ssh-pubkey/install.sh index db9dc3f..6f2ef5e 100644 --- a/ssh-pubkey/install.sh +++ b/ssh-pubkey/install.sh @@ -1,15 +1,20 @@ #!/bin/bash +set -e +set -u -{ - set -e - set -u +function __install_ssh_pubkey() { + my_cmd="ssh-pubkey" - MY_CMD="ssh-pubkey" + rm -f "$HOME/.local/bin/${my_cmd}" - rm -f "$HOME/.local/bin/$MY_CMD" - webi_download "$WEBI_HOST/packages/$MY_CMD/$MY_CMD.sh" "$HOME/.local/bin/$MY_CMD" - chmod a+x "$HOME/.local/bin/$MY_CMD" + webi_download \ + "$WEBI_HOST/packages/${my_cmd}/${my_cmd}.sh" \ + "$HOME/.local/bin/${my_cmd}" + + chmod a+x "$HOME/.local/bin/${my_cmd}" # run the command - "$HOME/.local/bin/$MY_CMD" + "$HOME/.local/bin/${my_cmd}" } + +__install_ssh_pubkey