module Awsam
Constants
- CONF_BASE_DIR
- CONF_DIR
- DEFAULT_LINK_NAME
- VERSION
Public Class Methods
get_accts_dir()
click to toggle source
# File lib/awsam.rb, line 20 def self.get_accts_dir base = get_conf_dir() acctsdir = File.join(base, 'accts') FileUtils.mkdir(acctsdir) unless File.exist?(acctsdir) acctsdir end
get_conf_dir()
click to toggle source
# File lib/awsam.rb, line 15 def self.get_conf_dir FileUtils.mkdir(CONF_DIR) unless File.exist?(CONF_DIR) CONF_DIR end
init_awsam()
click to toggle source
# File lib/awsam.rb, line 27 def self.init_awsam dir = get_conf_dir File.open(File.join(dir, "bash.rc"), "w") do |f| f << File.read(File.join(File.dirname(__FILE__), '../bashrc/rc.scr')) end puts puts "Initialized AWS Account Manager" puts puts "Add the following to your $HOME/.bashrc:" puts puts " if [ -s $HOME/#{CONF_BASE_DIR}/bash.rc ]; then" puts " source $HOME/#{CONF_BASE_DIR}/bash.rc" puts " fi" puts end