refactor: finish moving ssh-* scripts to own installers
[webi-installers/.git] / ssh-adduser / install.sh
deleted file mode 120000 (symlink)
index a4f9a4634131cfc1798d2703d0ebdc0e9d05d946..0000000000000000000000000000000000000000
+++ /dev/null
@@ -1 +0,0 @@
-../ssh-utils/ssh-adduser.sh
\ No newline at end of file
new file mode 100644 (file)
index 0000000000000000000000000000000000000000..0673917193245832a453f909279d980c4adf79fb
--- /dev/null
@@ -0,0 +1,20 @@
+#!/bin/bash
+set -e
+set -u
+
+function __install_ssh_adduser() {
+    my_cmd="ssh-adduser"
+
+    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
+    "$HOME/.local/bin/${my_cmd}"
+}
+
+__install_ssh_adduser