class RBT::ConfigureHelp
Constants
- NAMESPACE
#¶ ↑
NAMESPACE
¶ ↑#¶ ↑
Public Class Methods
[](i = '')
click to toggle source
new( commandline_arguments = nil, run_already = true )
click to toggle source
Public Instance Methods
colourize_environment_variables()
click to toggle source
#¶ ↑
colourize_environment_variables
¶ ↑
#¶ ↑
# File lib/rbt/utility_scripts/configure_help.rb, line 254 def colourize_environment_variables # ======================================================================= # # The next Array is to be defined via a leading ' ' token. # ======================================================================= # %w( CC CPP CFLAGS LDFLAGS LIBS ZENITY_CFLAGS ZENITY_LIBS X_CFLAGS X_LIBS LIBNOTIFY_CFLAGS LIBNOTIFY_LIBS WEBKIT_CFLAGS WEBKIT_LIBS ITSTOOL XMLLINT CPPFLAGS GTKDOC_DEPS_CFLAGS GTKDOC_DEPS_LIBS LT_SYS_LIBRARY_PATH PKG_CONFIG_LIBDIR PKG_CONFIG_PATH PKG_CONFIG LIBNL3_CFLAGS LIBNL3_LIBS LIBNL3GENL_CFLAGS LIBNL3GENL_LIBS LIBNL3GENL_CFLAGS LIBNL3GENL_LIBS XINPUT_CFLAGS XINPUT_LIBS XI2_CFLAGS XI2_LIBS XI21_CFLAGS XI21_LIBS XI22_CFLAGS XI22_LIBS ).each {|line| if @result.include? " #{line}" @result.gsub!(/( #{line})/, darkcyan('\1')) end } end
commandline_arguments?()
click to toggle source
extract_this_archive(i)
click to toggle source
#¶ ↑
extract_this_archive
¶ ↑
#¶ ↑
# File lib/rbt/utility_scripts/configure_help.rb, line 97 def extract_this_archive(i) require 'extracter' this_target = temp_dir? suffix_target = remove_archive_at_the_end(File.basename(i)) opnn; e 'Extracting the archive at `'+sfile(i)+'` `'+sfancy(this_target+suffix_target)+'`.' Extracter.extract_this( i, to: this_target, verbosity: be_quiet ) if File.directory?(this_target+suffix_target) change_directory(this_target+suffix_target) end end
report()
click to toggle source
reset()
click to toggle source
run()
click to toggle source
#¶ ↑
run (run tag)¶ ↑
#¶ ↑
# File lib/rbt/utility_scripts/configure_help.rb, line 115 def run menu(@commandline_arguments) unless File.exist? 'configure' opnn; e 'No file called '+sfile('configure')+' can be '\ 'found in the current directory.' return end @result = `./configure --help` # ======================================================================= # # Usually we wish to colourize the result, but if we debug this class # we may want to NOT colourize the result at all. # ======================================================================= # if @colourize_the_result and use_colours? @result.gsub!(/(`configure')/, seagreen('\1')) @result.gsub!(/(environment variables)/, yellowgreen('\1')) @result.gsub!(/(Usage:)/, crimson('\1')) @result.gsub!(/(VAR=VALUE)/, crimson('\1')) @result.gsub!(/(--bindir=DIR)/, orange('\1')) @result.gsub!(/(--sbindir=DIR)/, orange('\1')) @result.gsub!(/(--libexecdir=DIR)/, orange('\1')) @result.gsub!(/(--datadir=DIR)/, orange('\1')) @result.gsub!(/(--sysconfdir=DIR)/, orange('\1')) @result.gsub!(/(--sharedstatedir=DIR)/, orange('\1')) @result.gsub!(/(--localstatedir=DIR)/, orange('\1')) @result.gsub!(/(--libdir=DIR)/, orange('\1')) @result.gsub!(/(--includedir=DIR)/, orange('\1')) @result.gsub!(/(--oldincludedir=DIR)/, orange('\1')) @result.gsub!(/(--infodir=DIR)/, orange('\1')) @result.gsub!(/(--mandir=DIR)/, orange('\1')) @result.gsub!(/(--datarootdir=DIR)/, orange('\1')) @result.gsub!(/(--localedir=DIR)/, orange('\1')) @result.gsub!(/(--docdir=DIR)/, orange('\1')) @result.gsub!(/(--htmldir=DIR)/, orange('\1')) @result.gsub!(/(--dvidir=DIR)/, orange('\1')) @result.gsub!(/(--pdfdir=DIR)/, orange('\1')) @result.gsub!(/(--psdir=DIR)/, orange('\1')) @result.gsub!(/(Configuration:)/, dodgerblue('\1')) # ===================================================================== # # A bit royal-blue colourizing to be done next: # ===================================================================== # @result.gsub!(/(E?PREFIX\/)/, royalblue('\1')) @result.gsub!(/(DATAROOTDIR)/, royalblue('\1')) @result.gsub!(/(DOCDIR)/, royalblue('\1')) @result.gsub!(/\[(\/usr\/include)\]/, '['+royalblue('\1')+']') %w( --program-prefix=PREFIX --program-suffix=SUFFIX --program-transform-name=PROGRAM --build=BUILD --host=HOST --target=TARGET ).each {|line| @result.gsub!(/(#{line})/, plum('\1')) } %w( --disable-FEATURE --enable-FEATURE[=ARG] --enable-FEATURE=no --enable-maintainer-mode --with-PACKAGE[=ARG] --without-PACKAGE --with-helper-path-prefix=PATH --with-pic[=PKGS] --with-perl-options=OPTIONS --with-html-dir=PATH --with-release-version=STRING --with-proc=DIR --disable-option-checking --enable-silent-rules --disable-silent-rules --enable-dependency-tracking --disable-dependency-tracking --prefix=PREFIX --disable-rpath --enable-iso-c --enable-libnotify --disable-maintainer-mode --disable-nls --enable-static[=PKGS] --enable-shared[=PKGS] --enable-fast-install[=PKGS] --disable-libtool-lock --disable-perl-bindings --enable-gtk-doc --enable-gtk-doc-html --enable-gtk-doc-pdf --enable-debug[=no|minimum|yes|full] --disable-debug --enable-checks --disable-visibility --disable-linker-opts --enable-profiling --disable-selective-werror --enable-strict-compilation --enable-proc --enable-openvz --enable-cgroup --enable-vserver --enable-ancient-vserver --enable-taskstats --enable-unicode --enable-linux-affinity --enable-hwloc --enable-setuid --enable-delayacct ).each {|line| if @result.include? line @result.gsub!( /(#{Regexp.quote(line)})/, lightseagreen('\1') ) end } [ 'Program names:', 'Optional Features:', 'Optional Packages:', 'System types:', 'Installation directories:', 'Fine tuning of the installation directories:' ].each {|line| @result.gsub!(/(#{line})/, orangered('\1')) } if @result.include? '<http' @result.gsub!(/\<(https?:\/\/.+)\>/, '<'+springgreen('\1')+'>') end if @result.include? '@' # =================================================================== # # Colourize all emails. # =================================================================== # @result.gsub!(/<(\D{1,20}@\D{1,20}\.\D{1,5})>/, '<'+olivedrab('\1')+'>') end colourize_environment_variables end report end