Method: AWS_SSH::Setup#alias
- Defined in:
- lib/aws_ssh/setup.rb
#alias ⇒ Object
create the alias file
41 42 43 44 45 46 47 |
# File 'lib/aws_ssh/setup.rb', line 41 def alias msg = "# This is an automatically generated file; do not edit.\n# Created at #{Time.now}\n# Created by aws_ssh #{AWS_SSH::VERSION}\n" cmd = 'alias ssh="' + AWS_SSH::GENERATE_CMD + ' ; '+AWS_SSH::MERGE_CMD+ '; ssh"' filename=ENV['HOME']+"/"+AWS_SSH::ALIAS_FILE File.open(filename, 'w') { |file| file.write(msg+cmd) } return File.exists?(filename) end |