Skip to content

Instantly share code, notes, and snippets.

@jayzz55
Last active November 19, 2015 04:37
Show Gist options
  • Save jayzz55/0f3bb9e4d6e15a683493 to your computer and use it in GitHub Desktop.
Save jayzz55/0f3bb9e4d6e15a683493 to your computer and use it in GitHub Desktop.
PubKeys - concept
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