Sha256: 0e2a3f60ed73af628af9f4e40dd7c8c6faea00203bbe24f1f353013be42409ee

Contents?: true

Size: 430 Bytes

Versions: 3

Compression:

Stored size: 430 Bytes

Contents

=begin rdoc
  Adds a bash alias
=end
module PoolParty
  module Plugin
    class BashAlias < Plugin
      dsl_methods :name,  # the name of the cmd
                  :value, # the value of the alias
                  :user 

      def before_load(opts={}, &block)
        # TODO, why does "has_" segfault
        line_in_file :file => "/root/.profile", :line => "alias #{opts[:name]}='#{opts[:value]}'"
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
auser-poolparty-extensions-0.1.1 lib/extensions/bash_alias.rb
jashmenn-poolparty-extensions-0.1.0 lib/extensions/bash_alias.rb
jashmenn-poolparty-extensions-0.1.1 lib/extensions/bash_alias.rb