Last active
November 19, 2015 04:37
-
-
Save jayzz55/0f3bb9e4d6e15a683493 to your computer and use it in GitHub Desktop.
PubKeys - concept
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def main(options) do | |
path = files_path(Mix.env) | |
files_list = System.cmd("ls", [path]) |> elem(0) |> String.split("\n") | |
case options do | |
["--help"] -> IO.puts @instructions | |
["--deploy-all"] -> deploy_all(files_list, path) | |
["--add", ssh_key] -> add_user_key(ssh_key, files_list, path) | |
["--remove", ssh_key] -> remove_user_key(ssh_key, files_list, path) | |
_ -> IO.puts "Unrecognized input.\n#{@instructions}" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment