Class: Roebe::Slackware

Inherits:
Linux show all
Defined in:
lib/roebe/linux/slackware/slackware.rb,
lib/roebe/linux/slackware/remove_pulseaudio.rb

Overview

Roebe::Slackware

Direct Known Subclasses

RemovePulseaudio

Defined Under Namespace

Classes: RemovePulseaudio

Constant Summary collapse

ARRAY_COMPILE_THESE_PROGRAMS =
#

ARRAY_COMPILE_THESE_PROGRAMS

List which programs are to be compiled.

#
%w(
  m4
  flex
  bison
  make
  cmake
  coreutils
  diffutils
  binutils
  nettle
  gstreamer
  sed
  xsel
  libffi
  file
  lighttpd
  grep
  xvid
  gettext
  nano
  desktopfileutils
  icu4c
)

Constants included from Linux

Linux::ANSWER_CLASS, Linux::ANSWER_CLASS2, Linux::IMPORTANT

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(i = ARGV) ⇒ Slackware

#

initialize

#


56
57
58
59
60
61
62
# File 'lib/roebe/linux/slackware/slackware.rb', line 56

def initialize(
    i = ARGV
  )
  reset
  @array_compile_these_programs = ARRAY_COMPILE_THESE_PROGRAMS
  menu(i)
end

Class Method Details

.namespace?Boolean

#

Slackware.namespace?

#

Returns:

  • (Boolean)


20
21
22
# File 'lib/roebe/linux/slackware/slackware.rb', line 20

def self.namespace?
  @namespace
end

Instance Method Details

#compile_all_programs(i = compile_which_programs? ) ⇒ Object

#

compile_all_programs

#


103
104
105
106
107
108
109
# File 'lib/roebe/linux/slackware/slackware.rb', line 103

def compile_all_programs(
    i = compile_which_programs?
  ) 
  i.each {|this_program|
    compile_this_program(this_program)
  }
end

#compile_which_programs?Boolean

#

compile_which_programs?

#

Returns:

  • (Boolean)


96
97
98
# File 'lib/roebe/linux/slackware/slackware.rb', line 96

def compile_which_programs?
  @array_compile_these_programs
end
#

menu

#


67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# File 'lib/roebe/linux/slackware/slackware.rb', line 67

def menu(i)
  if i.is_a? Array
    if i.empty?
      compile_all_programs
    else
      i.each {|entry| menu(entry) }
    end
  else
    case i
    # ========================================================================= #
    # === slackware 3
    # ========================================================================= #
    when /\d{1,2}/ # Compile a speciremovepulseaudioonslackwarefic position.
      _ = @array_compile_these_programs[i.to_i - 1]
      compile_this_program(_)
    # ========================================================================= #
    # === slackware --help
    # ========================================================================= #
    when /help/ # rb slackware --help
      show_help(@array_compile_these_programs)
    else
      compile_these_programs(i)
    end
  end
end

#resetObject

#

reset

#


114
115
116
# File 'lib/roebe/linux/slackware/slackware.rb', line 114

def reset
  super()
end