refactor: finish moving ssh-* scripts to own installers
[webi-installers/.git] / ssh-setpass / install.sh
deleted file mode 120000 (symlink)
index 6944512177fd4d73e93609a4fa89c601ff15ae32..0000000000000000000000000000000000000000
+++ /dev/null
@@ -1 +0,0 @@
-../ssh-utils/ssh-setpass.sh
\ No newline at end of file
new file mode 100644 (file)
index 0000000000000000000000000000000000000000..67ef3b2ca70f7202fc6319f26a4336763abec7b2
--- /dev/null
@@ -0,0 +1,22 @@
+#!/bin/bash
+set -e
+set -u
+
+function __install_ssh_setpass() {
+    my_cmd="ssh-setpass"
+
+    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}"
+
+    # run the command
+    echo ''
+    echo 'Set passphrase for ~/.ssh/id_rsa?'
+    "$HOME/.local/bin/${my_cmd}"
+}
+
+__install_ssh_setpass