From d05e3e60c34dba04232a00de786d7bd1827efa8f Mon Sep 17 00:00:00 2001 From: Bama <44502143+ObamaTheLlama114@users.noreply.github.com> Date: Fri, 26 Jul 2024 16:52:10 -0500 Subject: [PATCH] website/scripts/docsmg: Add install script and readme draft (#10659) * add docsmg tool * moved to the correct scripts directory * removed test files * added install script and readme draft to docsmg --- website/scripts/docsmg/README.md | 7 +++++++ website/scripts/docsmg/install.sh | 4 ++++ website/scripts/docsmg/mcomplete.bash | 4 +--- 3 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 website/scripts/docsmg/README.md create mode 100755 website/scripts/docsmg/install.sh diff --git a/website/scripts/docsmg/README.md b/website/scripts/docsmg/README.md new file mode 100644 index 0000000000..913d990b2d --- /dev/null +++ b/website/scripts/docsmg/README.md @@ -0,0 +1,7 @@ +# Docsmg + +## Steps to install + +1. Install [rustup](https://rustup.rs/) if its not already installed +2. Update to the latest version of rust if you dont already have it with `rustup update` +3. Install the cli tool with `curl https://raw.githubusercontent.com/goauthentik/authentik/main/website/scripts/docsmg/install.sh | sh` diff --git a/website/scripts/docsmg/install.sh b/website/scripts/docsmg/install.sh new file mode 100755 index 0000000000..74762fd6ca --- /dev/null +++ b/website/scripts/docsmg/install.sh @@ -0,0 +1,4 @@ +cargo install --git https://github.com/goauthentik/authentik +sudo wget https://raw.githubusercontent.com/goauthentik/authentik/main/website/scripts/docsmg/m.bash -O /bin/map +sudo chmod 755 /bin/map +curl https://raw.githubusercontent.com/goauthentik/authentik/main/website/scripts/docsmg/mcomplete.bash >> ~/.zshrc diff --git a/website/scripts/docsmg/mcomplete.bash b/website/scripts/docsmg/mcomplete.bash index 5cb932430e..72505336c3 100755 --- a/website/scripts/docsmg/mcomplete.bash +++ b/website/scripts/docsmg/mcomplete.bash @@ -1,5 +1,3 @@ -#!/bin/bash - _completions () { if [[ -z "${MIGRATE_PATH}" ]]; then MIGRATE_PATH="./"; @@ -20,4 +18,4 @@ _completions () { done } -complete -o nospace -o filenames -F _completions m.bash +complete -o nospace -o filenames -F _completions map