Module: RBT
- Defined in:
- lib/rbt/base/ee.rb,
lib/rbt/base/ftp.rb,
lib/rbt/base/opn.rb,
lib/rbt/base/run.rb,
lib/rbt/base/base.rb,
lib/rbt/base/misc.rb,
lib/rbt/base/stub.rb,
lib/rbt/base/time.rb,
lib/rbt/base/xorg.rb,
lib/rbt/make/make.rb,
lib/rbt/make/menu.rb,
lib/rbt/base/debug.rb,
lib/rbt/base/email.rb,
lib/rbt/base/reset.rb,
lib/rbt/shell/help.rb,
lib/rbt/shell/menu.rb,
lib/rbt/aliases/run.rb,
lib/rbt/base/cliner.rb,
lib/rbt/base/editor.rb,
lib/rbt/cmake/cmake.rb,
lib/rbt/colours/rev.rb,
lib/rbt/compile/env.rb,
lib/rbt/compile/ftp.rb,
lib/rbt/compile/kde.rb,
lib/rbt/compile/opn.rb,
lib/rbt/compile/run.rb,
lib/rbt/compile/sed.rb,
lib/rbt/compile/set.rb,
lib/rbt/compile/tab.rb,
lib/rbt/libtool/run.rb,
lib/rbt/shell/shell.rb,
lib/rbt/sinatra/app.rb,
lib/rbt/aliases/help.rb,
lib/rbt/aliases/menu.rb,
lib/rbt/base/colours.rb,
lib/rbt/base/esystem.rb,
lib/rbt/base/symlink.rb,
lib/rbt/colours/sdir.rb,
lib/rbt/colours/simp.rb,
lib/rbt/compile/blfs.rb,
lib/rbt/compile/exit.rb,
lib/rbt/compile/help.rb,
lib/rbt/compile/lxqt.rb,
lib/rbt/compile/make.rb,
lib/rbt/compile/menu.rb,
lib/rbt/compile/misc.rb,
lib/rbt/compile/path.rb,
lib/rbt/compile/perl.rb,
lib/rbt/compile/porg.rb,
lib/rbt/compile/ruby.rb,
lib/rbt/compile/tags.rb,
lib/rbt/compile/time.rb,
lib/rbt/compile/xfce.rb,
lib/rbt/compile/xorg.rb,
lib/rbt/compile/yaml.rb,
lib/rbt/gui/gtk2/box.rb,
lib/rbt/libtool/help.rb,
lib/rbt/libtool/menu.rb,
lib/rbt/libtool/misc.rb,
lib/rbt/aliases/reset.rb,
lib/rbt/colours/sfile.rb,
lib/rbt/colours/swarn.rb,
lib/rbt/compile/clang.rb,
lib/rbt/compile/cmake.rb,
lib/rbt/compile/debug.rb,
lib/rbt/compile/games.rb,
lib/rbt/compile/reset.rb,
lib/rbt/compile/shell.rb,
lib/rbt/compile/strip.rb,
lib/rbt/libtool/reset.rb,
lib/rbt/prefix/prefix.rb,
lib/rbt/aliases/report.rb,
lib/rbt/base/constants.rb,
lib/rbt/base/load_yaml.rb,
lib/rbt/base/prototype.rb,
lib/rbt/base/readlines.rb,
lib/rbt/base/save_file.rb,
lib/rbt/base/word_wrap.rb,
lib/rbt/colours/sfancy.rb,
lib/rbt/compile/ccache.rb,
lib/rbt/compile/cflags.rb,
lib/rbt/compile/ensure.rb,
lib/rbt/compile/obtain.rb,
lib/rbt/compile/prefix.rb,
lib/rbt/compile/python.rb,
lib/rbt/compile/sigint.rb,
lib/rbt/compile/static.rb,
lib/rbt/compile/system.rb,
lib/rbt/aliases/aliases.rb,
lib/rbt/aliases/dataset.rb,
lib/rbt/base/be_verbose.rb,
lib/rbt/base/copy_files.rb,
lib/rbt/base/initialize.rb,
lib/rbt/base/return_pwd.rb,
lib/rbt/colours/colours.rb,
lib/rbt/compile/autogen.rb,
lib/rbt/compile/colours.rb,
lib/rbt/compile/extract.rb,
lib/rbt/compile/flexbox.rb,
lib/rbt/compile/headers.rb,
lib/rbt/compile/libtool.rb,
lib/rbt/compile/symlink.rb,
lib/rbt/compile/version.rb,
lib/rbt/headers/headers.rb,
lib/rbt/libtool/libtool.rb,
lib/rbt/project/project.rb,
lib/rbt/shell/constants.rb,
lib/rbt/version/version.rb,
lib/rbt/base/remove_file.rb,
lib/rbt/commandline/misc.rb,
lib/rbt/compile/autoconf.rb,
lib/rbt/compile/ldconfig.rb,
lib/rbt/compile/profiles.rb,
lib/rbt/compile/register.rb,
lib/rbt/compile/warnings.rb,
lib/rbt/misc/sed_wrapper.rb,
lib/rbt/aliases/constants.rb,
lib/rbt/base/exit_program.rb,
lib/rbt/base/programs_dir.rb,
lib/rbt/compile/configure.rb,
lib/rbt/compile/constants.rb,
lib/rbt/compile/gobolinux.rb,
lib/rbt/compile/permanent.rb,
lib/rbt/constants/newline.rb,
lib/rbt/constants/regexes.rb,
lib/rbt/cookbooks/highest.rb,
lib/rbt/encoding/encoding.rb,
lib/rbt/errors/exceptions.rb,
lib/rbt/libtool/constants.rb,
lib/rbt/aliases/initialize.rb,
lib/rbt/compile/initialize.rb,
lib/rbt/compile/preinstall.rb,
lib/rbt/compile/statistics.rb,
lib/rbt/cookbooks/all_urls.rb,
lib/rbt/cookbooks/homepage.rb,
lib/rbt/libtool/initialize.rb,
lib/rbt/toplevel_methods/e.rb,
lib/rbt/base/copy_directory.rb,
lib/rbt/colours/use_colours.rb,
lib/rbt/compile/commandline.rb,
lib/rbt/linux/fedora/fedora.rb,
lib/rbt/namespace/namespace.rb,
lib/rbt/sinatra/action_view.rb,
lib/rbt/sql/create_database.rb,
lib/rbt/utility_scripts/url.rb,
lib/rbt/colours/html_colours.rb,
lib/rbt/compile/linux/gentoo.rb,
lib/rbt/compile/make_install.rb,
lib/rbt/compile/mate_desktop.rb,
lib/rbt/constants/home_for_x.rb,
lib/rbt/misc/exclusive_logic.rb,
lib/rbt/toplevel_methods/ftp.rb,
lib/rbt/toplevel_methods/opn.rb,
lib/rbt/toplevel_methods/rds.rb,
lib/rbt/url_action/constants.rb,
lib/rbt/utility_scripts/blfs.rb,
lib/rbt/base/change_directory.rb,
lib/rbt/base/create_directory.rb,
lib/rbt/base/remove_directory.rb,
lib/rbt/compile/class_methods.rb,
lib/rbt/constants/remote_urls.rb,
lib/rbt/controller/controller.rb,
lib/rbt/misc/colourize_parser.rb,
lib/rbt/misc/configure_string.rb,
lib/rbt/registered/registered.rb,
lib/rbt/requires/require_yaml.rb,
lib/rbt/toplevel_methods/misc.rb,
lib/rbt/toplevel_methods/time.rb,
lib/rbt/url_action/url_action.rb,
lib/rbt/utility_scripts/ntrad.rb,
lib/rbt/utility_scripts/scons.rb,
lib/rbt/utility_scripts/users.rb,
lib/rbt/check_for_updates/base.rb,
lib/rbt/commandline/initialize.rb,
lib/rbt/compile/create_program.rb,
lib/rbt/cookbooks/cookbook/run.rb,
lib/rbt/cookbooks/cookbook/set.rb,
lib/rbt/cookbooks/find_headers.rb,
lib/rbt/sql/generate_sql_table.rb,
lib/rbt/toplevel_methods/chmod.rb,
lib/rbt/toplevel_methods/debug.rb,
lib/rbt/toplevel_methods/email.rb,
lib/rbt/toplevel_methods/games.rb,
lib/rbt/toplevel_methods/meson.rb,
lib/rbt/toplevel_methods/patch.rb,
lib/rbt/toplevel_methods/roebe.rb,
lib/rbt/base/available_programs.rb,
lib/rbt/base/expanded_cookbooks.rb,
lib/rbt/base/is_a_64_bit_system.rb,
lib/rbt/colours/require_colours.rb,
lib/rbt/compile/build_directory.rb,
lib/rbt/compile/meson_and_ninja.rb,
lib/rbt/constants/archive_types.rb,
lib/rbt/cookbooks/cookbook/help.rb,
lib/rbt/cookbooks/cookbook/menu.rb,
lib/rbt/cookbooks/cookbook/misc.rb,
lib/rbt/logging/create_log_file.rb,
lib/rbt/toplevel_methods/cliner.rb,
lib/rbt/toplevel_methods/editor.rb,
lib/rbt/toplevel_methods/md5sum.rb,
lib/rbt/toplevel_methods/stderr.rb,
lib/rbt/url_action/compile_mode.rb,
lib/rbt/utility_scripts/chainer.rb,
lib/rbt/aliases/cookbook_aliases.rb,
lib/rbt/base/program_information.rb,
lib/rbt/compile/cookbook_dataset.rb,
lib/rbt/cookbooks/cookbook/guess.rb,
lib/rbt/cookbooks/cookbook/reset.rb,
lib/rbt/gui/gtk2/compile_program.rb,
lib/rbt/gui/gtk2/textview_widget.rb,
lib/rbt/make/colour_make_install.rb,
lib/rbt/sinatra/toplevel_methods.rb,
lib/rbt/symlink_this_program/run.rb,
lib/rbt/toplevel_methods/esystem.rb,
lib/rbt/toplevel_methods/extract.rb,
lib/rbt/toplevel_methods/favicon.rb,
lib/rbt/toplevel_methods/symlink.rb,
lib/rbt/toplevel_methods/to_bool.rb,
lib/rbt/toplevel_methods/uchroot.rb,
lib/rbt/compile_base/compile_base.rb,
lib/rbt/constants/ruby_source_dir.rb,
lib/rbt/constants/utility_scripts.rb,
lib/rbt/cookbooks/cookbook/ensure.rb,
lib/rbt/cookbooks/cookbook/obtain.rb,
lib/rbt/cookbooks/merge_cookbooks.rb,
lib/rbt/libtool/remove_this_entry.rb,
lib/rbt/misc/reverse_dependencies.rb,
lib/rbt/symlink_this_program/help.rb,
lib/rbt/symlink_this_program/menu.rb,
lib/rbt/symlink_this_program/misc.rb,
lib/rbt/toplevel_methods/download.rb,
lib/rbt/toplevel_methods/home_dir.rb,
lib/rbt/toplevel_methods/split_at.rb,
lib/rbt/toplevel_methods/tutorial.rb,
lib/rbt/utility_scripts/toolchain.rb,
lib/rbt/utility_scripts/use_flags.rb,
lib/rbt/base/commandline_arguments.rb,
lib/rbt/base/source_base_directory.rb,
lib/rbt/constants/chained_programs.rb,
lib/rbt/constants/sysbin_directory.rb,
lib/rbt/constants/toplevel_methods.rb,
lib/rbt/errors/file_does_not_exist.rb,
lib/rbt/linux/gentoo/create_ebuild.rb,
lib/rbt/registered/registered_tags.rb,
lib/rbt/statistics/show_statistics.rb,
lib/rbt/symlink_this_program/reset.rb,
lib/rbt/toplevel_methods/cookbooks.rb,
lib/rbt/toplevel_methods/gnome_ftp.rb,
lib/rbt/toplevel_methods/gobolinux.rb,
lib/rbt/toplevel_methods/save_file.rb,
lib/rbt/utility_scripts/to_current.rb,
lib/rbt/compile/problems_and_errors.rb,
lib/rbt/compile/program_information.rb,
lib/rbt/compile/upload_and_download.rb,
lib/rbt/configuration/configuration.rb,
lib/rbt/cookbooks/cookbook/cookbook.rb,
lib/rbt/cookbooks/cookbook/feedback.rb,
lib/rbt/cookbooks/cookbook/sanitize.rb,
lib/rbt/cookbooks/feedback_licenses.rb,
lib/rbt/cookbooks/show_last_updated.rb,
lib/rbt/create_app_dir_skeleton/run.rb,
lib/rbt/toplevel_methods/remote_url.rb,
lib/rbt/toplevel_methods/return_pwd.rb,
lib/rbt/toplevel_methods/show_names.rb,
lib/rbt/utility_scripts/autosymlink.rb,
lib/rbt/commandline/commandline_menu.rb,
lib/rbt/constants/validation_scripts.rb,
lib/rbt/cookbooks/cookbook/constants.rb,
lib/rbt/cookbooks/cookbook/determine.rb,
lib/rbt/create_app_dir_skeleton/menu.rb,
lib/rbt/create_app_dir_skeleton/misc.rb,
lib/rbt/symlink_this_program/setters.rb,
lib/rbt/symlink_this_program/symlink.rb,
lib/rbt/toplevel_methods/author_name.rb,
lib/rbt/toplevel_methods/is_included.rb,
lib/rbt/toplevel_methods/remove_file.rb,
lib/rbt/toplevel_methods/xorg_buffer.rb,
lib/rbt/utility_scripts/post_install.rb,
lib/rbt/check_for_updates/update_lxqt.rb,
lib/rbt/compile/postinstallation_step.rb,
lib/rbt/cookbooks/check_for_inclusion.rb,
lib/rbt/cookbooks/cookbook/initialize.rb,
lib/rbt/cookbooks/multi_url_displayer.rb,
lib/rbt/cookbooks/scan_source_archive.rb,
lib/rbt/create_app_dir_skeleton/reset.rb,
lib/rbt/linux/gobolinux/create_recipe.rb,
lib/rbt/registered/registered_headers.rb,
lib/rbt/requires/require_base_scripts.rb,
lib/rbt/statistics/compile_strategies.rb,
lib/rbt/toplevel_methods/all_binaries.rb,
lib/rbt/toplevel_methods/archive_type.rb,
lib/rbt/toplevel_methods/dual_compile.rb,
lib/rbt/toplevel_methods/find_url_for.rb,
lib/rbt/utility_scripts/chain_compile.rb,
lib/rbt/utility_scripts/change_prefix.rb,
lib/rbt/constants/standalone_constants.rb,
lib/rbt/cookbooks/search_for_tags/help.rb,
lib/rbt/cookbooks/search_for_tags/menu.rb,
lib/rbt/cookbooks/search_for_tags/misc.rb,
lib/rbt/cookbooks/show_dependencies_on.rb,
lib/rbt/cookbooks/suggest_cookbook_for.rb,
lib/rbt/gui/gtk2/statistics/statistics.rb,
lib/rbt/gui/gtk3/statistics/statistics.rb,
lib/rbt/information/gather_information.rb,
lib/rbt/linux/kernel/rename_system_map.rb,
lib/rbt/registered/registered_binaries.rb,
lib/rbt/registered/registered_m4_files.rb,
lib/rbt/symlink_this_program/constants.rb,
lib/rbt/toplevel_methods/all_libraries.rb,
lib/rbt/toplevel_methods/batch_compile.rb,
lib/rbt/toplevel_methods/error_message.rb,
lib/rbt/toplevel_methods/is_on_windows.rb,
lib/rbt/toplevel_methods/log_directory.rb,
lib/rbt/toplevel_methods/pin_and_unpin.rb,
lib/rbt/toplevel_methods/verbose_truth.rb,
lib/rbt/utility_scripts/backup_program.rb,
lib/rbt/utility_scripts/build_detector.rb,
lib/rbt/utility_scripts/create_package.rb,
lib/rbt/utility_scripts/remove_program.rb,
lib/rbt/utility_scripts/show_all_about.rb,
lib/rbt/compile/do_compile_this_program.rb,
lib/rbt/cookbooks/create_snapcraft_file.rb,
lib/rbt/cookbooks/generate_homepage/run.rb,
lib/rbt/linux/slackware/filelist_parser.rb,
lib/rbt/linux/slackware/update_slackpkg.rb,
lib/rbt/registered/registered_gir_files.rb,
lib/rbt/registered/registered_libraries.rb,
lib/rbt/symlink_this_program/initialize.rb,
lib/rbt/toplevel_methods/chroot_compile.rb,
lib/rbt/toplevel_methods/temp_directory.rb,
lib/rbt/utility_scripts/beautify_system.rb,
lib/rbt/utility_scripts/build_directory.rb,
lib/rbt/utility_scripts/profile_install.rb,
lib/rbt/utility_scripts/remove_programs.rb,
lib/rbt/utility_scripts/remove_symlinks.rb,
lib/rbt/utility_scripts/symlink_headers.rb,
lib/rbt/compile/show_report_and_feedback.rb,
lib/rbt/cookbooks/find_all_archive_types.rb,
lib/rbt/cookbooks/local_check_for_latest.rb,
lib/rbt/cookbooks/scan_for_blfs_programs.rb,
lib/rbt/generate_files/generate_makefile.rb,
lib/rbt/linux/debian/create_control_file.rb,
lib/rbt/linux/linux_from_scratch/lfs/lfs.rb,
lib/rbt/linux/linux_from_scratch/lfs/run.rb,
lib/rbt/requires/require_utility_scripts.rb,
lib/rbt/toplevel_methods/depot_directory.rb,
lib/rbt/toplevel_methods/make_app_prefix.rb,
lib/rbt/toplevel_methods/module_programs.rb,
lib/rbt/utility_scripts/convert_pkgbuild.rb,
lib/rbt/utility_scripts/expand_cookbooks.rb,
lib/rbt/utility_scripts/replace_symlinks.rb,
lib/rbt/utility_scripts/update_entry/run.rb,
lib/rbt/utility_scripts/version_switcher.rb,
lib/rbt/cookbooks/find_duplicate_binaries.rb,
lib/rbt/create_app_dir_skeleton/constants.rb,
lib/rbt/sql/create_sql_from_this_cookbook.rb,
lib/rbt/toplevel_methods/change_directory.rb,
lib/rbt/toplevel_methods/copy_recursively.rb,
lib/rbt/toplevel_methods/create_directory.rb,
lib/rbt/toplevel_methods/sysbin_directory.rb,
lib/rbt/toplevel_methods/sysetc_directory.rb,
lib/rbt/toplevel_methods/syslib_directory.rb,
lib/rbt/toplevel_methods/system_directory.rb,
lib/rbt/utility_scripts/config_log_parser.rb,
lib/rbt/utility_scripts/extra_information.rb,
lib/rbt/utility_scripts/update_entry/misc.rb,
lib/rbt/compile/batch_compile_the_programs.rb,
lib/rbt/compile/set_compile_these_programs.rb,
lib/rbt/cookbooks/allowed_cookbook_entries.rb,
lib/rbt/cookbooks/cookbook/show_and_report.rb,
lib/rbt/create_app_dir_skeleton/initialize.rb,
lib/rbt/generate_files/create_bash_scripts.rb,
lib/rbt/linux/debian/create_debian_package.rb,
lib/rbt/linux/linux_from_scratch/lfs/reset.rb,
lib/rbt/utility_scripts/fix_pkgconfig_file.rb,
lib/rbt/utility_scripts/installed_programs.rb,
lib/rbt/utility_scripts/show_compile_chain.rb,
lib/rbt/utility_scripts/update_entry/reset.rb,
lib/rbt/check_for_updates/update_kde_plasma.rb,
lib/rbt/colours/permanently_disable_colours.rb,
lib/rbt/constants/standalone_file_constants.rb,
lib/rbt/cookbooks/raw_cookbook/raw_cookbook.rb,
lib/rbt/cookbooks/search_for_tags/constants.rb,
lib/rbt/errors/map_line_to_a_specific_error.rb,
lib/rbt/generate_files/generate_shellscript.rb,
lib/rbt/libtool/class_methods/class_methods.rb,
lib/rbt/libtool/search_in_these_directories.rb,
lib/rbt/toplevel_methods/array_all_rubygems.rb,
lib/rbt/toplevel_methods/available_programs.rb,
lib/rbt/toplevel_methods/convert_global_env.rb,
lib/rbt/toplevel_methods/cookbook_directory.rb,
lib/rbt/toplevel_methods/get_all_files_from.rb,
lib/rbt/toplevel_methods/infer_build_system.rb,
lib/rbt/toplevel_methods/no_trad_no_symlink.rb,
lib/rbt/toplevel_methods/packages_directory.rb,
lib/rbt/toplevel_methods/programs_directory.rb,
lib/rbt/utility_scripts/cleanup_system_tags.rb,
lib/rbt/utility_scripts/compile_base_system.rb,
lib/rbt/utility_scripts/copy_these_archives.rb,
lib/rbt/utility_scripts/fetch_all_m4_macros.rb,
lib/rbt/utility_scripts/flatpak_url_scanner.rb,
lib/rbt/utility_scripts/install_glib_schema.rb,
lib/rbt/utility_scripts/not_found_libraries.rb,
lib/rbt/utility_scripts/package_rbt_scripts.rb,
lib/rbt/utility_scripts/remove_all_symlinks.rb,
lib/rbt/utility_scripts/report_xfce_version.rb,
lib/rbt/utility_scripts/symlink_glib_schema.rb,
lib/rbt/cookbooks/search_for_tags/initialize.rb,
lib/rbt/generate_files/create_pkgconfig_file.rb,
lib/rbt/generate_files/generate_pdf_tutorial.rb,
lib/rbt/toplevel_methods/pkgconfig_directory.rb,
lib/rbt/toplevel_methods/run_makepkg_command.rb,
lib/rbt/toplevel_methods/show_available_tags.rb,
lib/rbt/utility_scripts/apply_sed_operations.rb,
lib/rbt/utility_scripts/feedback_binaries_of.rb,
lib/rbt/utility_scripts/feedback_information.rb,
lib/rbt/utility_scripts/parse_configure_help.rb,
lib/rbt/utility_scripts/show_dependencies_of.rb,
lib/rbt/utility_scripts/symlink_all_programs.rb,
lib/rbt/validation/validate_cookbook_aliases.rb,
lib/rbt/constants/registered_cookbook_entries.rb,
lib/rbt/cookbooks/generate_homepage/html_tags.rb,
lib/rbt/cookbooks/toggle_keep_extracted_value.rb,
lib/rbt/package_managers/create_rpm_spec_file.rb,
lib/rbt/registered/registered_pkgconfig_files.rb,
lib/rbt/requires/require_the_toplevel_methods.rb,
lib/rbt/toplevel_methods/create_log_directory.rb,
lib/rbt/toplevel_methods/does_this_file_exist.rb,
lib/rbt/toplevel_methods/n_programs_available.rb,
lib/rbt/toplevel_methods/sysinclude_directory.rb,
lib/rbt/toplevel_methods/update_all_ruby_gems.rb,
lib/rbt/utility_scripts/compile_into_home_dir.rb,
lib/rbt/utility_scripts/simplify_root_entries.rb,
lib/rbt/check_for_updates/update_kde_framework.rb,
lib/rbt/configuration/initialize_configuration.rb,
lib/rbt/constants/file_and_directory_constants.rb,
lib/rbt/cookbooks/download_all_source_archives.rb,
lib/rbt/cookbooks/generate_homepage/initialize.rb,
lib/rbt/linux/linux_from_scratch/lfs/constants.rb,
lib/rbt/toplevel_methods/do_show_the_classname.rb,
lib/rbt/toplevel_methods/remove_file_extension.rb,
lib/rbt/toplevel_methods/source_base_directory.rb,
lib/rbt/utility_scripts/convert_to_traditional.rb,
lib/rbt/utility_scripts/find_multiple_versions.rb,
lib/rbt/utility_scripts/query_file_association.rb,
lib/rbt/utility_scripts/update_entry/constants.rb,
lib/rbt/validation/check_validity_of_cookbooks.rb,
lib/rbt/validation/report_useless_descriptions.rb,
lib/rbt/cookbooks/create_cookbook_yaml_file/run.rb,
lib/rbt/generate_files/create_big_yaml_cookbook.rb,
lib/rbt/problems_and_errors/problems_and_errors.rb,
lib/rbt/requires/require_the_validation_scripts.rb,
lib/rbt/toplevel_methods/compile_these_programs.rb,
lib/rbt/toplevel_methods/fix_incorrect_symlinks.rb,
lib/rbt/toplevel_methods/install_which_binaries.rb,
lib/rbt/toplevel_methods/system_share_directory.rb,
lib/rbt/utility_scripts/autoupdate_this_program.rb,
lib/rbt/utility_scripts/query_binary_to_package.rb,
lib/rbt/utility_scripts/query_header_to_package.rb,
lib/rbt/utility_scripts/simple_version_comparer.rb,
lib/rbt/utility_scripts/symlink_pkgconfig_files.rb,
lib/rbt/utility_scripts/update_entry/initialize.rb,
lib/rbt/check_for_updates/check_for_blfs_updates.rb,
lib/rbt/cookbooks/create_cookbook_yaml_file/menu.rb,
lib/rbt/cookbooks/create_cookbook_yaml_file/misc.rb,
lib/rbt/cookbooks/display_cookbook_dataset/reset.rb,
lib/rbt/generate_files/generate_shell_completion.rb,
lib/rbt/homebrew/registered_programs_of_homebrew.rb,
lib/rbt/libtool/class_methods/use_this_directory.rb,
lib/rbt/linux/gobolinux/create_dependencies_file.rb,
lib/rbt/linux/slackware/create_slackware_package.rb,
lib/rbt/linux/slackware/generate_slack_desc_file.rb,
lib/rbt/toplevel_methods/configuration_directory.rb,
lib/rbt/toplevel_methods/configure_appdir_prefix.rb,
lib/rbt/toplevel_methods/simple_appdir_configure.rb,
lib/rbt/utility_scripts/find_alternative_archive.rb,
lib/rbt/utility_scripts/remove_empty_directories.rb,
lib/rbt/utility_scripts/remove_outdated_archives.rb,
lib/rbt/validation/validate_all_cookbook_entries.rb,
lib/rbt/check_for_updates/check_for_gnome_updates.rb,
lib/rbt/check_for_updates/update_kde_applications.rb,
lib/rbt/check_for_updates/update_kde_porting_aids.rb,
lib/rbt/configuration/simple_configuration_loader.rb,
lib/rbt/cookbooks/create_cookbook_yaml_file/reset.rb,
lib/rbt/cookbooks/search_for_tags/search_for_tags.rb,
lib/rbt/generate_files/generate_rbt_configuration.rb,
lib/rbt/toplevel_methods/get_all_directories_from.rb,
lib/rbt/validation/check_for_correct_dependencies.rb,
lib/rbt/validation/report_missing_licence_entries.rb,
lib/rbt/generate_files/create_global_yaml_database.rb,
lib/rbt/libtool/class_methods/return_every_la_file.rb,
lib/rbt/linux/gobolinux/gobolinux_recipes_comparer.rb,
lib/rbt/requires/require_the_registered_components.rb,
lib/rbt/statistics/show_how_many_files_are_tracked.rb,
lib/rbt/toplevel_methods/install_libstdc_plus_plus.rb,
lib/rbt/toplevel_methods/system_settings_directory.rb,
lib/rbt/utility_scripts/convert_to_non_traditional.rb,
lib/rbt/generate_files/generate_machomebrew_formula.rb,
lib/rbt/information/create_program_version_url_file.rb,
lib/rbt/libtool/class_methods/autocorrect_this_file.rb,
lib/rbt/linux/gobolinux/gobolinux_naming_convention.rb,
lib/rbt/linux/linux_from_scratch/parse_blfs_webpage.rb,
lib/rbt/requires/require_the_generate_files_classes.rb,
lib/rbt/toplevel_methods/run_make_then_make_install.rb,
lib/rbt/toplevel_methods/show_last_configure_option.rb,
lib/rbt/utility_scripts/report_mate_desktop_version.rb,
lib/rbt/cookbooks/display_cookbook_dataset/constants.rb,
lib/rbt/gui/shared_code/statistics/statistics_module.rb,
lib/rbt/misc/create_and_populate_pkgconfig_directory.rb,
lib/rbt/toplevel_methods/check_for_binary_duplicates.rb,
lib/rbt/toplevel_methods/determine_host_architecture.rb,
lib/rbt/toplevel_methods/remove_archive_from_the_end.rb,
lib/rbt/utility_scripts/check_for_available_versions.rb,
lib/rbt/utility_scripts/check_for_duplicate_binaries.rb,
lib/rbt/utility_scripts/system_compile_possibilities.rb,
lib/rbt/check_for_updates/NEW_check_for_gnome_updates.rb,
lib/rbt/check_for_updates/check_for_slackware_updates.rb,
lib/rbt/configuration/configuration_instance_variable.rb,
lib/rbt/cookbooks/create_cookbook_yaml_file/constants.rb,
lib/rbt/cookbooks/expanded_cookbook/expanded_cookbook.rb,
lib/rbt/cookbooks/generate_homepage/generate_homepage.rb,
lib/rbt/determine_archive_type/determine_archive_type.rb,
lib/rbt/generate_files/generate_flatpak_manifest_file.rb,
lib/rbt/requires/require_the_cookbook_utility_scripts.rb,
lib/rbt/toplevel_methods/feedback_program_description.rb,
lib/rbt/utility_scripts/purge_headers_of_this_program.rb,
lib/rbt/constants/predefined_installation_instructions.rb,
lib/rbt/cookbooks/create_cookbook_yaml_file/initialize.rb,
lib/rbt/cookbooks/show_configuration_options/constants.rb,
lib/rbt/linux/slackware/install_this_slackware_package.rb,
lib/rbt/misc/map_this_input_to_that_registered_program.rb,
lib/rbt/toplevel_methods/return_programs_from_this_url.rb,
lib/rbt/utility_scripts/beautify_configure_help_output.rb,
lib/rbt/utility_scripts/purge_binaries_of_this_program.rb,
lib/rbt/utility_scripts/report_the_registered_programs.rb,
lib/rbt/utility_scripts/symlink_into_usr_lib_directory.rb,
lib/rbt/validation/batch_validate_the_cookbook_recipes.rb,
lib/rbt/cookbooks/check_for_existing_source_directories.rb,
lib/rbt/create_app_dir_skeleton/create_app_dir_skeleton.rb,
lib/rbt/toplevel_methods/return_version_of_this_program.rb,
lib/rbt/toplevel_methods/show_available_utility_scripts.rb,
lib/rbt/utility_scripts/purge_libraries_of_this_program.rb,
lib/rbt/utility_scripts/show_versions_of_these_programs.rb,
lib/rbt/validation/scan_for_missing_last_update_entries.rb,
lib/rbt/check_for_updates/check_for_mate_desktop_updates.rb,
lib/rbt/toplevel_methods/return_binaries_of_this_program.rb,
lib/rbt/libtool/remove_libtool_files/remove_libtool_files.rb,
lib/rbt/toplevel_methods/return_blfs_page_of_this_program.rb,
lib/rbt/toplevel_methods/create_programs_version_html_file.rb,
lib/rbt/toplevel_methods/report_total_size_of_all_archives.rb,
lib/rbt/utility_scripts/check_for_invalid_current_symlinks.rb,
lib/rbt/check_for_updates/check_for_new_release_on_rubygems.rb,
lib/rbt/colours/determine_the_toplevel_use_colours_variable.rb,
lib/rbt/toplevel_methods/get_all_files_and_directories_from.rb,
lib/rbt/utility_scripts/increment_program_version/constants.rb,
lib/rbt/cookbooks/display_cookbook_dataset/feedback/feedback.rb,
lib/rbt/requires/require_the_classes_for_individual_programs.rb,
lib/rbt/toplevel_methods/check_this_cookbook_file_for_errors.rb,
lib/rbt/toplevel_methods/create_html_page_for_these_programs.rb,
lib/rbt/toplevel_methods/generate_programs_version_yaml_file.rb,
lib/rbt/utility_scripts/binary_name_belongs_to_which_program.rb,
lib/rbt/utility_scripts/save_the_available_programs_versions.rb,
lib/rbt/toplevel_methods/swift_return_version_of_this_program.rb,
lib/rbt/validation/check_for_invalid_entries_in_this_cookbook.rb,
lib/rbt/toplevel_methods/fast_return_file_size_of_this_program.rb,
lib/rbt/toplevel_methods/return_base_directory_of_this_program.rb,
lib/rbt/utility_scripts/show_description_and_extra_information.rb,
lib/rbt/toplevel_methods/handle_this_extract_related_user_input.rb,
lib/rbt/check_for_updates/report_these_programs_could_be_updated.rb,
lib/rbt/cookbooks/display_cookbook_dataset/feedback/feedback_url.rb,
lib/rbt/misc/classes_for_individual_programs/change_lib64_to_lib.rb,
lib/rbt/toplevel_methods/determine_appdir_prefix_from_this_input.rb,
lib/rbt/toplevel_methods/report_how_many_binaries_are_registered.rb,
lib/rbt/toplevel_methods/return_all_archives_from_this_directory.rb,
lib/rbt/utility_scripts/compile_into_home_dir_without_symlinking.rb,
lib/rbt/utility_scripts/register_program_files_into_yaml_database.rb,
lib/rbt/toplevel_methods/try_to_return_a_special_compile_component.rb,
lib/rbt/utility_scripts/compile_via_environment_variable_as_prefix.rb,
lib/rbt/cookbooks/display_cookbook_dataset/display_cookbook_dataset.rb,
lib/rbt/cookbooks/required_dependencies_on/required_dependencies_on.rb,
lib/rbt/toplevel_methods/configure_has_a_higher_priority_than_meson.rb,
lib/rbt/toplevel_methods/ensure_that_the_required_directories_exist.rb,
lib/rbt/toplevel_methods/return_location_to_this_programs_yaml_file.rb,
lib/rbt/utility_scripts/postinstallation_step/postinstallation_step.rb,
lib/rbt/utility_scripts/show_overview_over_available_utility_scripts.rb,
lib/rbt/information/aggregate_information_from_the_expanded_cookbooks.rb,
lib/rbt/libtool/class_methods/return_all_la_files_from_this_directory.rb,
lib/rbt/toplevel_methods/compile_via_appdir_prefix_without_symlinking.rb,
lib/rbt/utility_scripts/registered_program_files_into_global_database.rb,
lib/rbt/toplevel_methods/return_array_of_programs_without_a_blfs_entry.rb,
lib/rbt/toplevel_methods/return_string_containing_all_program_versions.rb,
lib/rbt/cookbooks/show_configuration_options/show_configuration_options.rb,
lib/rbt/toplevel_methods/report_extended_information_about_this_program.rb,
lib/rbt/cookbooks/find_directory_entries_without_corresponding_yaml_file.rb,
lib/rbt/linux/linux_from_scratch/make_conditional_symlink_for_lfs_binutils.rb,
lib/rbt/toplevel_methods/try_to_find_shortcut_for_a_chain_compiled_program.rb,
lib/rbt/utility_scripts/symlink_all_upcased_programs_to_downcased_variants.rb,
lib/rbt/utility_scripts/increment_program_version/increment_program_version.rb,
lib/rbt/utility_scripts/create_shell_script_containing_these_program_versions.rb,
lib/rbt/utility_scripts/purge_incorrect_yaml_directories_in_the_programs_hierarchy.rb,
lib/rbt/toplevel_methods/return_program_name_and_program_version_from_this_github_url.rb,
lib/rbt/utility_scripts/classes_for_individual_programs/create_pkgconfig_file_for_lua.rb,
lib/rbt/utility_scripts/static_overview_of_the_available_binaries_on_this_computer_system.rb,
lib/rbt/libtool/class_methods/append_this_directory_to_the_list_of_directories_to_search_for.rb
Overview
#
require 'rbt/toplevel_methods/return_program_name_and_program_version_from_this_github_url.rb' RBT.return_program_name_and_program_version_from_this_github_url
#
Defined Under Namespace
Modules: ClassesForIndividualPrograms, Configuration, Cookbooks, Errors, GUI, Gobolinux, Gtk, Linux, SaveFile Classes: AggregateInformationFromTheExpandedCookbooks, ApplySedOperations, Autosymlink, AutoupdateThisProgram, BackupProgram, Base, BeautifyConfigureHelpOutput, BeautifySystem, BinaryNameBelongsToWhichProgram, Blfs, BuildDetector, BuildDirectory, ChainCompile, Chainer, ChangePrefix, CheckForDuplicateBinaries, CheckForInvalidCurrentSymlinks, CleanupSystemTags, Cmake, ColourMakeInstall, ColourizeParser, Commandline, Compile, CompileBase, CompileBaseSystem, CompileIntoHomeDir, CompileIntoHomeDirWithoutSymlinking, CompileStrategies, CompileViaEnvironmentVariableAsPrefix, ConfigLogParser, ConfigureString, Controller, ConvertToNonTraditional, ConvertToTraditional, CopyTheseArchives, CreateAndPopulatePkgconfigDirectory, CreateAppDirSkeleton, CreateBashScripts, CreateLogFile, CreatePackage, CreatePkgconfigFile, CreatePkgconfigFileForLua, CreateProgramVersionUrlFile, CreateRpmSpecFile, CreateShellScriptContainingTheseProgramsVersions, DetermineArchiveType, ExclusiveLogic, ExtraInformation, FeedbackBinariesOf, FeedbackInformation, FetchAllM4Macros, FileDoesNotExist, FindAlternativeArchive, FixPkgconfigFile, FlatpakUrlScanner, GatherInformation, GenerateFlatpakManifestFile, GenerateMachomebrewFormula, GenerateMakefile, GeneratePdfTutorial, GenerateRbtConfiguration, GenerateShellCompletion, GenerateShellscript, GenerateSqlTable, Headers, InstallGlibSchema, InstalledPrograms, Libtool, Make, MapThisInputToThatRegisteredProgram, NotAllowedDirectory, NotFoundLibraries, Ntrad, PackageRbtScripts, ParseConfigureHelp, PostInstall, PostinstallationStep, Prefix, ProblemsAndErrors, ProfileInstall, PurgeBinariesOfThisProgram, PurgeHeadersOfThisProgram, PurgeIncorrectYamlDirectoriesInTheProgramsHierarchy, PurgeLibrariesOfThisProgram, QueryBinaryToPackage, QueryFileAssociation, QueryHeaderToPackage, RegisterProgramFilesIntoGlobalDatabase, RegisterProgramFilesIntoYamlDatabase, RegisteredTags, RemoveAllSymlinks, RemoveEmptyDirectories, RemoveOutdatedArchives, RemoveProgram, RemovePrograms, RemoveSymlinks, ReplaceSymlinks, ReportMateDesktopVersion, ReportXfceVersion, RequiredDependenciesOn, ReverseDependencies, SaveTheAvailableProgramsVersions, Scons, SedWrapper, ShowAllAbout, ShowCompileChain, ShowDescriptionAndExtraInformation, ShowHowManyFilesAreTracked, ShowStatistics, ShowVersionsOfThesePrograms, SimpleVersionComparer, SimplifyRootEntries, Sinatra, StaticOverviewOfTheAvailableBinariesOnThisComputerSystem, SuggestCookbookFor, SymlinkAllPrograms, SymlinkAllUpcasedProgramsToDowncasedVariants, SymlinkGlibSchema, SymlinkHeaders, SymlinkIntoUsrLibDirectory, SymlinkPkgconfigFiles, SymlinkThisProgram, SystemCompilePossibilities, ToCurrent, Toolchain, UpdateEntry, UpdateSlackpkg, UrlAction, UseFlags, Users, VersionSwitcher
Constant Summary collapse
- ColourMake =
Make
- COLOURS =
#
COLOURS
#
::Colours
- PROJECT_BASE_DIRECTORY =
#
RBT::PROJECT_BASE_DIRECTORY
#
File.absolute_path("#{__dir__}/..")+'/'
- RBT_BASE_DIR =
#
RBT::RBT_BASE_DIR
#
PROJECT_BASE_DIRECTORY
- PROJECT_BASE_DIR =
#
RBT::PROJECT_BASE_DIR
#
PROJECT_BASE_DIRECTORY
- RUBY_RBT =
#
RBT::RUBY_RBT
#
PROJECT_BASE_DIRECTORY
- PROJECT_YAML_DIRECTORY =
#
RBT::PROJECT_YAML_DIRECTORY
This constant specifies where our project-specific YAML files are to be kept - the yaml base directory.
There are several “aliases” to this constant here.
This constant will store a path, as String, such as this one here:
/Programs/Ruby/2.5.1/lib/ruby/site_ruby/2.5.0/rbt/yaml/
#
"#{RBT.project_base_dir?}yaml/"
- PROJECT_YAML_DIR =
PROJECT_YAML_DIR
PROJECT_YAML_DIRECTORY
- RBT_YAML =
#
RBT_YAML
RBT_YAML is simply an alias to the above constant ^^^.
#
PROJECT_YAML_DIRECTORY
- RBT_YAML_DIRECTORY =
#
RBT_YAML_DIRECTORY
#
PROJECT_YAML_DIRECTORY
- VERSION =
#
RBT::VERSION
Which version does RBT have. Query via: RBT::VERSION. PROGRAM_VERSION is just an alias to it - stick to using VERSION instead “officially” whenever possible.
#
'0.8.105'
- RBT_VERSION_NUMBER =
RBT_VERSION_NUMBER
VERSION
- PROGRAM_VERSION =
PROGRAM_VERSION
VERSION
- LAST_UPDATE =
#
RBT::LAST_UPDATE
This specifies when the RBT project was last updated. It should be updated whenever the VERSION constant changes.
#
'14.01.2021'
- URL_TO_THE_DOCUMENTATION =
#
RBT::URL_TO_THE_DOCUMENTATION
#
"https://www.rubydoc.info/gems/rbt/#{VERSION}"
- N =
#
N
#
"\n"
- KDE_REGEX_FOR_REMOTE_ARCHIVES =
#
KDE_REGEX_FOR_REMOTE_ARCHIVES
This is the regex that can be used in order to obtain the proper remote URL to the individual KDE packages.
As an example, have a look here:
https://rubular.com/r/3ZX5Rz8soGqjsw
#
/<tr><td valign="top"><a href="(.+.tar.xz)"><img/
- REGEXES_TO_SHOW_THE_SOURCE_DIRECTORY =
#
RBT::REGEXES_TO_SHOW_THE_SOURCE_DIRECTORY
These regexes can be used to show/check for the source directory.
#
[ /^-?-?source(-|_| )?dir\??$/, /^-?-?source(-|_| )?archive\??$/, /^-?-?src(-|_| )?dir\??$/ ]
- REGEX_TO_SANITIZE_LIBRARIES =
#
REGEX_TO_SANITIZE_LIBRARIES
Use this regex if you wish to sanitize some libraries.
#
/(.+)\.{(\w+),(\w+)}?/
- REGEX_TO_USE_FOR_FOR_GITHUB =
#
RBT::REGEX_TO_USE_FOR_FOR_GITHUB
This constant is used to grab archives from github.
These archives have a form like:
https://github.com/ninja-build/ninja/archive/v1.7.1.tar.gz
The following example on rubular shows how to use this:
http://rubular.com/r/xTVfP9TWKG
The match that will be returned is then a String such as:
v1.7.1.tar.gz
#
/^http.+\/archive\/(v.+)$/
- ENCODING_UTF =
#
ENCODING_UTF
#
'UTF-8'
- ENCODING_ISO =
#
ENCODING_ISO
#
'ISO-8859-1'
- ISO_ENCODING =
ENCODING_ISO
- USE_THIS_ENCODING =
#
USE_THIS_ENCODING
Main pointer towards the main Encoding for the RBT project.
#
ENCODING_UTF
- USE_MAIN_ENCODING =
USE_MAIN_ENCODING
USE_THIS_ENCODING
- NAMESPACE =
#
RBT::NAMESPACE
Which namespace we shall use for the RBT project may be defined here.
#
{ namespace: 'RBT' }
- HOME_FOR_X =
#
RBT::HOME_FOR_X
This constant is mostly used on my home setup, so it will be fairly useless for other people.
#
'/home/x/'
- HOME_DIRECTORY_FOR_USER_X =
HOME_DIRECTORY_FOR_USER_X
HOME_FOR_X
- DOWNLOAD_KDE_ORG =
#
DOWNLOAD_KDE_ORG
#
'https://download.kde.org/'
- REMOTE_URL_FOR_KDE_FRAMEWORKS =
#
RBT::REMOTE_URL_FOR_KDE_FRAMEWORKS
This URL should point to the latest KDE-frameworks release.
Presently, (08 September 2018) the latest KDE-frameworks release is 5.50.0 (the URL, oddly enough, does not include the trailing “0”). Subsequent releases neither have had a trailing “0”.
To batch-update from the commandline, try this:
update_kde_frameworks updatekdeframeworks
#
"#{DOWNLOAD_KDE_ORG}stable/frameworks/5.78/"
- REMOTE_URL_FOR_KDE_PORTING_AIDS =
#
RBT::REMOTE_URL_FOR_KDE_PORTING_AIDS
This constant must come after the constant REMOTE_URL_FOR_KDE_FRAMEWORKS has been defined.
To update these, try:
rbt --update_porting_aids
#
"#{REMOTE_URL_FOR_KDE_FRAMEWORKS}portingAids/"
- REMOTE_URL_FOR_KDE_APPLICATIONS =
#
RBT::REMOTE_URL_FOR_KDE_APPLICATIONS
To batch-update these applications, do:
update_kde_applications updatekdeapplications
#
"#{DOWNLOAD_KDE_ORG}stable/release-service/20.12.1/src/"
- REMOTE_URL_FOR_KDE_PLASMA =
#
RBT::REMOTE_URL_FOR_KDE_PLASMA (plasma tag)
Always point to the latest KDE-Plasma (upstream) URL here with this constant, such as www.kde.org/info/plasma-5.14.3.php.
To invoke updating all KDE-plasma components from the commandline, you may issue the following command:
update_kde_plasma updatekdeplasma
#
"#{DOWNLOAD_KDE_ORG}stable/plasma/5.20.5/"
- REMOTE_DOWNLOAD_URL_FOR_KDE_PLASMA =
#
RBT::REMOTE_DOWNLOAD_URL_FOR_KDE_PLASMA
#
"#{DOWNLOAD_KDE_ORG}stable/plasma/"
- REMOTE_PUB_MATE_DESKTOP_RELEASES =
#
RBT::REMOTE_PUB_MATE_DESKTOP_RELEASES
#
'http://pub.mate-desktop.org/releases/'
- REMOTE_PUB_MATE_DESKTOP_RELEASES_LATEST_VERSION =
#
RBT::REMOTE_PUB_MATE_DESKTOP_RELEASES_LATEST_VERSION (mate tag)
This should be used as the base for the download-functionality in the file check_for_mate_desktop_updates.rb
This would correspond to an URL like:
http://pub.mate-desktop.org/releases/1.22/
#
"#{REMOTE_PUB_MATE_DESKTOP_RELEASES}1.22/"
- REMOTE_DOWNLOAD_BASE_URL_FOR_LXQT =
#
REMOTE_DOWNLOAD_BASE_URL_FOR_LXQT
#
'https://downloads.lxqt.org/'
- CURRENT_VERSION_OF_LXQT =
#
CURRENT_VERSION_OF_LXQT
Use this constant to keep track as to which lxqt version is the one that is currently tracked by RBT. It has to be manually updated (for now).
#
'0.14.1'
- REMOTE_DOWNLOAD_URL_FOR_LXQT =
#
REMOTE_DOWNLOAD_URL_FOR_LXQT
The following constant should have an URL such as:
https://downloads.lxqt.org/0.14.1.html
#
"#{REMOTE_DOWNLOAD_BASE_URL_FOR_LXQT}#{CURRENT_VERSION_OF_LXQT}.html"
- REMOTE_SLACKWARE_HOMEPAGE =
#
RBT::REMOTE_SLACKWARE_HOMEPAGE
#
'http://www.slackware.com/changelog/current.php?cpu=x86_64'
- BASE_URL_TO_GNOME_SOURCES =
#
RBT::BASE_URL_TO_GNOME_SOURCES
#
'https://ftp.gnome.org/pub/GNOME/sources/'
- BLFS_CHANGELOG_WEBPAGE =
#
RBT::BLFS_CHANGELOG_WEBPAGE
#
'http://www.linuxfromscratch.org/blfs/view/cvs/introduction/changelog.html'
- REMOTE_URL_TO_THE_MATE_DESKTOP_COMPONENTS =
#
RBT::REMOTE_URL_TO_THE_MATE_DESKTOP_COMPONENTS
This constant specifies where we can find the (remote) source code to the mate-desktop, via HTTP-file listing.
#
"#{REMOTE_PUB_MATE_DESKTOP_RELEASES_LATEST_VERSION}?C=M&O=D"
- URL_TO_REMOTE_CHANGELOG =
#
URL_TO_REMOTE_CHANGELOG
Where to keep the remote changelog, if we make use of one that is.
#
'http://shevy.bplaced.net//rbt_changelog.html'
- SHALL_WE_DEBUG =
default fallback.
DEBUG = false
- TAR_XZ =
#
TAR_XZ
Several archive types are kept here.
#
'.tar.xz'
- TARXZ =
TARXZ
TAR_XZ
- TAR_BZ2 =
#
TAR_BZ2
#
'.tar.bz2'
- TARBZ2 =
TARBZ2
TAR_BZ2
- TAR_GZ =
#
TAR_GZ
#
'.tar.gz'
- TARGZ =
TARGZ
TAR_GZ
- ZIP =
#
RBT::ZIP
#
'.zip'
- GEM =
#
GEM
#
'.gem'
- LZ =
#
LZ
#
'.lz'
- DEFAULT_ARCHIVE_TYPE =
#
RBT::DEFAULT_ARCHIVE_TYPE
This constant may be required so that other classes know which is the default archive. This can then be used to, for example, repackage archives into this format.
#
TAR_XZ
- ARRAY_REGISTERED_ARCHIVES =
#
ARRAY_REGISTERED_ARCHIVES
Keep these archive formats registered in this Array.
#
[ TAR_XZ, TAR_BZ2, TAR_GZ, ZIP, GEM, LZ ]
- Cookbook =
#
RBT::Cookbook
#
Cookbooks::Cookbook
- COOKBOOK_ALIASES =
This will be for most everyone else.
{}
- RUBY_SRC_DIR =
#
RBT::RUBY_SRC_DIR
This deliberately hard-coded constant is for my home system - it helps speed up the development process if I can use such constants as shortcuts.
#
"#{HOME_FOR_X}DATA/PROGRAMMING_LANGUAGES/RUBY/src/"
- RUBY_SRC_DIR_AT_HOME =
RUBY_SRC_DIR_AT_HOME
RUBY_SRC_DIR
- RUBY_SRC_DIRECTORY =
RUBY_SRC_DIRECTORY
RUBY_SRC_DIR
- RUBY_SRC =
RUBY_SRC
RUBY_SRC_DIR
- RUBY_SRC_DIR_RBT =
#
RBT::RUBY_SRC_DIR_RBT
This constant is only useful on my home system.
It corresponds to:
/home/x/DATA/PROGRAMMING_LANGUAGES/RUBY/src/rbt/lib/rbt/
#
"#{RUBY_SRC_DIR}rbt/lib/rbt/"
- ROEBE_PATH_TO_COOKBOOKS =
ROEBE_PATH_TO_COOKBOOKS
RUBY_SRC_DIR_RBT
- RUBY_SRC_DIR_RBT_YAML =
#
RBT::RUBY_SRC_DIR_RBT_YAML
This constant may correspond to the String “/home/x/DATA/PROGRAMMING_LANGUAGES/RUBY/src/rbt/lib/rbt/yaml/”.
#
"#{RUBY_SRC_DIR_RBT}yaml/"
- RUBY_SRC_DIR_RBT_YAML_AT_HOME =
#
RUBY_SRC_DIR_RBT_YAML_AT_HOME
#
RUBY_SRC_DIR_RBT_YAML
- RUBY_SRC_RBT_COOKBOOKS =
#
RBT::RUBY_SRC_RBT_COOKBOOKS
This constant refers to the following path on my home system:
/home/x/DATA/PROGRAMMING_LANGUAGES/RUBY/src/rbt/lib/rbt/yaml/cookbooks/
#
"#{RUBY_SRC_DIR_RBT_YAML}cookbooks/"
- USER_HOME_DIRECTORY =
#
USER_HOME_DIRECTORY
This constant can also be used in order to determine the home directory. It is recommended to use the method instead, though.
#
RBT.home_dir?
- N_CHARACTERS_PER_LINE =
#
RBT::N_CHARACTERS_PER_LINE
Default value to be used for word-wrap splitting.
#
78
- CHAINED_PROGRAMS =
Use an empty hash in this case.
{}
- SYSBIN_DIRECTORY =
#
RBT::SYSBIN_DIRECTORY
The following constant should not be used; instead, one should rather use the method RBT.sysbin_directory?, since that method also is set through the yaml-configuration.
Nonetheless there may be some situations where having a hardcoded default is useful, so this constant will remain part of the RBT project.
#
'/usr/bin/'
- LOCATION_REGISTERED_TAGS =
#
LOCATION_REGISTERED_TAGS
cat $COOKBOOKS/yaml/registered_tags.yml
#
"#{RBT.yaml_directory?}registered_tags.yml"
- YAML_FILE_REGISTERED_TAGS =
Otherwise, initialize as empty hash.
{}
- ALL_TAGS =
ALL_TAGS
YAML_FILE_REGISTERED_TAGS
- GNOME_FTP_URL =
#
GNOME_FTP_URL
#
'http://ftp.gnome.org/pub/gnome/sources/?C=M;O=D'
- USE_FLAGS =
nil
- USE_TAGS =
#
USE_TAGS
Whether to use (and thus symlink) tags. Can be changed via the yaml configuration file.
#
@configuration.
- USE_ABSOLUTE_SYMLINKING =
#
RBT::USE_ABSOLUTE_SYMLINKING
#
@configuration.use_absolute_symlinking
- REPORT_SPECIFIC_PROGRAM_NAME =
#
REPORT_SPECIFIC_PROGRAM_NAME
#
@configuration.report_specific_program_name
- CAPITALIZE_PROGRAM_NAMES =
#
CAPITALIZE_PROGRAM_NAME
Whether we should capitalize the program names or not. The difference will then be e. g. “htop” versus “Htop”.
#
@configuration.capitalize_program_names
- CAPITALIZE_PROGRAM_NAME =
CAPITALIZE_PROGRAM_NAMES
- STOP_ON_ERROR =
#
STOP_ON_ERROR
Whether we stop on error or not.
#
@configuration.stop_on_error
- YAML_DATABASE_DIRECTORY =
#
YAML_DATABASE_DIRECTORY
Directory definition to use our yaml databases.
#
RBT.rbt_log_directory?
- TRY_TO_DOWNLOAD_IF_NOT_FOUND =
#
RBT::TRY_TO_DOWNLOAD_IF_NOT_FOUND
Whether to try and download a program if we can not find it locally.
#
RBT.configuration?.try_to_download_if_not_found
- FILE_REGISTERED_BINARIES =
#
FILE_REGISTERED_BINARIES
This may be a file path such as:
/home/Programs/Ruby/2.7.1/lib/ruby/site_ruby/2.7.0/rbt/yaml/registered/binaries.yml
cat $COOKBOOKS/yaml/registered_binaries.yml
#
"#{RBT.yaml_directory_for_the_registered_yaml_files?}binaries.yml"
- YAML_FILE_REGISTERED_BINARIES =
Otherwise, initialize as empty hash.
{}
- ALL_BINARIES =
ALL_BINARIES
YAML_FILE_REGISTERED_BINARIES
- TABULATOR =
#
RBT::TABULATOR
#
"\t"
- GOBOLINUX_LAYOUT =
#
RBT::GOBOLINUX_LAYOUT
This constant is probably only needed for gobolinux systems.
#
"#{ENV['GOBOLINUX_LAYOUT']}"
- REGISTER_COMPILED_PROGRAM =
#
RBT::REGISTER_COMPILED_PROGRAM
Whether we should register compiled programs or not.
#
true
- COMPILE_EVERYTHING_INTO_STANDALONE_DIRECTORY =
#
RBT::COMPILE_EVERYTHING_INTO_STANDALONE_DIRECTORY
Whether to compile everything into a standalone directory or not.
#
false
- SHELL_ERROR_CODE =
#
RBT::SHELL_ERROR_CODE
Shell Error code - to append.
#
' 2>&1'
- ERROR_LINE =
SHELL_ERROR_CODE
- DEFAULT_PROGRAM_ENTRY =
#
RBT::DEFAULT_PROGRAM_ENTRY
#
'htop'
- DEFAULT_ENTRY =
an “alias” to the above ^^^
DEFAULT_PROGRAM_ENTRY
- FILE_CPUINFO =
#
RBT::FILE_CPUINFO
#
'/proc/cpuinfo'
- HOST_CPU =
#
HOST_CPU
The host CPU that the scripts are running on.
#
RbConfig::CONFIG['host_cpu']
- TARGET_CPU =
#
TARGET_CPU
The target CPU that we are running on.
#
RbConfig::CONFIG['target_cpu']
- MAKE_COMMAND_TO_USE =
#
RBT::MAKE_COMMAND_TO_USE
Which make command to use by default.
#
'make'
- CHECK_FOR_BINARY_NAMES =
#
RBT::CHECK_FOR_BINARY_NAMES
#
true
- CHECK_FOR_LIBRARY_NAMES =
#
RBT::CHECK_FOR_LIBRARY_NAMES
#
true
- SHOW_EXTRA_INFORMATION =
#
RBT::SHOW_EXTRA_INFORMATION
#
true
- LINUX =
#
RBT::LINUX
#
"#{ENV['LINUX']}"
- DIRECTORY_INDIVIDUAL_COOKBOOKS_AT_ROEBE_HOME =
#
DIRECTORY_INDIVIDUAL_COOKBOOKS_AT_ROEBE_HOME
This constant is used mostly on my home system.
#
"#{RUBY_SRC_DIR_RBT_YAML}cookbooks/"
- COOKBOOKS_BASE_DIRECTORY =
#
RBT::COOKBOOKS_BASE_DIRECTORY
The following constant is actually only useful for my home system, and only if I don't use any other setting. So this is mostly just here for legacy reasons.
#
"#{HOME_DIRECTORY_FOR_USER_X}DATA/PROGRAMMING_LANGUAGES/RUBY/src/rbt/lib/rbt/yaml/cookbooks/"
- RBT_HOMEPAGE_URL =
#
RBT::RBT_HOMEPAGE_URL
The RBT Homepage is defined here.
#
'https://rubygems.org/gems/rbt'
- DEFAULT_COLOUR_TO_USE =
#
RBT::DEFAULT_COLOUR_TO_USE
Specify what is our main colour to use for the Cookbooks project.
#
"\e[0;32m"
- ARRAY_HELP_OPTIONS =
#
ARRAY_HELP_OPTIONS (help tag)
All the help options are stored here. These are the ones that work on e. g. “rbt –help”.
#
%w( HELP -h --help --help? help hel he h display_standard_help_options )+['Display help']
- HASH_ENGLISH_NUMBERS =
#
HASH_ENGLISH_NUMBERS
#
{ 'one' => 1, 'two' => 2, 'three' => 3, 'four' => 4, 'five' => 5, 'six' => 6, 'seven' => 7, 'eight' => 8, 'nine' => 9 }
- ARRAY_HELP_VERSION_OPTIONS =
#
ARRAY_HELP_VERSION_OPTIONS
#
%w( --version? --version version? VERSION version )
- ARRAY_SPECIAL_COMPONENT_CONTAINING_MANY_SUBCOMPONENTS =
#
ARRAY_SPECIAL_COMPONENT_CONTAINING_MANY_SUBCOMPONENTS
Here we add constants that can be used like in this way:
ry --plasma1 ry --gnome3
#
%w( kde kde_apps mate game xfce xorg gnome plasma lxqt portingaids )
- FILE_REGISTERED_LIBRARIES =
#
FILE_REGISTERED_LIBRARIES
This may be a file path such as:
/Programs/Ruby/2.4.1/lib/ruby/site_ruby/2.4.0/rbt/yaml/registered_libraries.yml
cat $RBT/yaml/registered_libraries.yml
#
"#{RBT.yaml_directory_for_the_registered_yaml_files?}libraries.yml"
- YAML_FILE_REGISTERED_LIBRARIES =
Otherwise, initialize as empty hash.
{}
- ALL_LIBRARIES =
ALL_LIBRARIES
YAML_FILE_REGISTERED_LIBRARIES
- FILE_REGISTERED_GIR_FILES =
#
FILE_REGISTERED_GIR_FILES
#
"#{RBT.yaml_directory_for_the_registered_yaml_files?}gir_files.yml"
- FILE_SETUP_PY =
#
RBT::FILE_SETUP_PY
This constant can be useful if you have to install a program that depends on the file 'setup.py'.
#
'setup.py'
- FILE_SCONS =
#
FILE_SCONS
#
'SConstruct'
- FILE_WAF =
#
FILE_WAF
#
'waf'
- FILE_CMAKE_LISTS =
#
FILE_CMAKE_LISTS
#
'CMakeLists.txt'
- ConfigureHelp =
#
RBT::ConfigureHelp
#
ParseConfigureHelp
- REGISTERED_COOKBOOK_ENTRIES =
[]
- FILE_REGISTERED_PKGCONFIG_FILES =
#
FILE_REGISTERED_PKGCONFIG_FILES
#
"#{RBT.yaml_directory_for_the_registered_yaml_files?}pkgconfig_files.yml"
- DEPOT_DIR =
#
RBT::DEPOT_DIR
Hardcoded path to the depot-directory.
#
'/Depot/'
- USR_INCLUDE_DIR =
#
RBT::USR_INCLUDE_DIR
This can be standalone because it will be ALWAYS absolute, pointing towards “/usr/include/”.
#
'/usr/include/'
- LAST_DOWNLOADED_FILE =
#
RBT::LAST_DOWNLOADED_FILE
#
"#{RBT.home_dir?}LAST_DOWNLOADED_FILE.md"
- FILE_USE_FLAGS =
#
RBT::FILE_USE_FLAGS
#
"#{_}use_flags.yml"
- FILE_ABBREVIATIONS =
#
FILE_ABBREVIATIONS
Note that this file will store only abbreviations to the programs, not the name of the program at hand.
On my home system this file may reside here:
/home/x/DATA/PROGRAMMING_LANGUAGES/RUBY/src/rbt/lib/rbt/yaml/abbreviations_to_the_programs.yml
#
"#{_}abbreviations_to_the_programs.yml"
- FILE_COOKBOOK_ALIASES =
#
RBT::FILE_COOKBOOK_ALIASES
#
"#{_}cookbook_aliases.yml"
- FILE_WINDOWS_COOKBOOK =
#
RBT::FILE_WINDOWS_COOKBOOK
#
"#{_}windows_cookbook.yml"
- FILE_COMPILE_HOOKS =
#
RBT::FILE_COMPILE_HOOKS
#
"#{_}compile_hooks.yml"
- FILE_TIME_COMPILATION =
#
RBT::FILE_TIME_COMPILATION
#
"#{_}configuration/time_compilation.yml"
- FILE_PROGRAMS_DIRECTORY =
#
FILE_PROGRAMS_DIRECTORY
#
"#{_}configuration/programs_directory.yml"
- FILE_TRY_TO_USE_THE_FILE_WINDOWS_COOKBOOK =
#
FILE_TRY_TO_USE_THE_FILE_WINDOWS_COOKBOOK
#
"#{_}configuration/try_to_use_the_file_windows_cookbook.yml"
- FILE_USE_MD5SUM =
#
RBT::FILE_USE_MD5SUM
#
"#{_}configuration/use_md5sum.yml"
- FILE_USE_PORG =
#
RBT::FILE_USE_PORG
#
"#{_}configuration/use_porg.yml"
- FILE_SHORT_TUTORIAL =
#
RBT::FILE_SHORT_TUTORIAL
#
"#{RBT.project_base_dir?}tutorial/short_tutorial.md"
- SPECIFICATION_OF_REGISTERED_COOKBOOK_ENTRIES =
YAML.load_file( RBT.file_specification_of_registered_cookbook_entries )
- FILE_PROGRAMS_VERSION =
#
RBT::FILE_PROGRAMS_VERSION
This file, when existing, holds a shorter name: version dataset for all programs.
#
"#{_}programs_version/programs_version.yml"
- FILE_BUILD_SYSTEM_PRIORITIES =
#
FILE_BUILD_SYSTEM_PRIORITIES
#
"#{_}build_systems_priorities.yml"
- FILE_DEBUG =
#
RBT::FILE_DEBUG
The debug file.
#
"#{RBT.configuration_directory?}debug.yml"
- FILE_STORING_THE_TIME_IT_TOOK_TO_COMPILE_PROGRAMS =
#
FILE_STORING_THE_TIME_IT_TOOK_TO_COMPILE_PROGRAMS
Ideally do not use this constant, but the method defined below instead.
#
"#{RBT.log_directory?}database_storing_compile_times.yml"
- FILE_CCACHE =
#
RBT::FILE_CCACHE
#
"#{_}configuration/use_ccache.yml"
- FILE_BUILD_SYSTEMS_PRIORITIES =
#
FILE_BUILD_SYSTEMS_PRIORITIES
#
"#{_}build_systems_priorities.yml"
- FILE_IS_ON_GOBOLINUX =
#
RBT::FILE_IS_ON_GOBOLINUX
This file may be generated by RBT if you issue any of the following commands:
rbt --is-on-gobolinux rbt --isongobolinux rbt isongobolinux
#
"#{RBT.log_directory?}is_on_gobolinux"
- FILE_COOKBOOK_CHAINED_PROGRAMS =
#
RBT::FILE_COOKBOOK_CHAINED_PROGRAMS
Easier constant to keep track of the chained cookbook-programs. In this context, a chain means a successive run of programs that are to be compiled.
This will then yield to a path such as the following:
/Programs/Ruby/2.5.1/lib/ruby/site_ruby/2.5.0/rbt/yaml/cookbook_chained_programs.yml
#
"#{_}chained_programs.yml"
- FILE_GLOBAL_FLAGS =
#
RBT::FILE_GLOBAL_FLAGS
#
"#{_}global_flags.yml"
- ROEBE_FILE_GLOBAL_FLAGS =
#
RBT::ROEBE_FILE_GLOBAL_FLAGS
This constant here is only for my home system, hence the prefix ROEBE in it.
#
"#{RUBY_SRC_DIR_RBT_YAML}"\ "#{File.basename(FILE_GLOBAL_FLAGS)}"
- FILE_LAST_COMPILED_PROGRAM =
#
FILE_LAST_COMPILED_PROGRAM
The YAML file containing the last compiled program. You should use the method RBT.file_last_compiled_program instead, though, as this one is more dynamic.
#
"#{RBT.log_directory?}last_compiled_programs.yml"
- FILE_BASE_TEMPLATE_FOR_COOKBOOK_YAML_FILES =
#
FILE_BASE_TEMPLATE_FOR_COOKBOOK_YAML_FILES
This constant specifies the path to the base-template file that can be used for creating new .yml files, for the RBT::Cookbooks namespace.
#
PROJECT_BASE_DIR+'cookbooks/template/base_template_for_cookbook_yaml_files.md'
- DIRECTORY_RBT_PROFILES =
#
RBT::DIRECTORY_RBT_PROFILES
This may be a path such as:
/home/Programs/Ruby/2.6.5/lib/ruby/site_ruby/2.6.0/rbt/misc/profiles/
#
"#{PROJECT_BASE_DIR}misc/profiles/"
- DIRECTORY_TO_THE_PROFILES =
DIRECTORY_TO_THE_PROFILES
DIRECTORY_RBT_PROFILES
- FILE_REGISTERED_HEADERS =
#
FILE_REGISTERED_HEADERS
Prefer to use the method RBT.file_registered_headers instead.
#
"#{_}registered/registered_headers.yml"
- REMOTE_URL_TO_THE_HOMEBREW_FORMULAS =
#
RBT::REMOTE_URL_TO_THE_HOMEBREW_FORMULAS
#
'https://formulae.brew.sh/formula/'
- CreateSlackwarePackage =
#
RBT::CreateSlackwarePackage
#
RBT::Linux::Slackware::CreateSlackwarePackage
- HASH_INSTALLATION_INSTRUCTIONS =
#
RBT::HASH_INSTALLATION_INSTRUCTIONS
This Hash gives us an easier handle to sanitize our data.
It has some constant-shortcuts that are convenient for use lateron.
For instance, RINSTALL means “ruby install”, PINSTALL means “python install”.
#
{}
- InstallThisSlackwarePackage =
#
RBT::InstallThisSlackwarePackage
#
RBT::Linux::Slackware::InstallThisSlackwarePackage
Class Method Summary collapse
-
.all_binaries? ⇒ Boolean
# === RBT.all_binaries?.
-
.all_headers? ⇒ Boolean
# === RBT.all_headers? =========================================================================== #.
-
.all_libraries? ⇒ Boolean
# === RBT.all_libraries?.
-
.all_tags? ⇒ Boolean
# === RBT.all_tags? ========================================================================= #.
-
.all_urls(optional_commands = nil) ⇒ Object
# === RBT.all_urls.
-
.append_error_message(i) ⇒ Object
# === RBT.append_error_message ========================================================================= #.
-
.append_what_into(what, into) ⇒ Object
# === RBT.append_what_into ========================================================================= #.
-
.are_we_on_gobolinux? ⇒ Boolean
# === RBT.are_we_on_gobolinux?.
-
.array_all_rubygems ⇒ Object
# === RBT.array_all_rubygems.
-
.array_binary_duplicates(from_this_directory = :default, to = :default) ⇒ Object
# === RBT.array_binary_duplicates.
-
.array_these_ruby_gems_were_updated? ⇒ Boolean
# === RBT.array_these_ruby_gems_were_updated? ========================================================================= #.
-
.audio_directory? ⇒ Boolean
# === RBT.audio_directory?.
-
.author_name? ⇒ Boolean
# === RBT.author_name? ========================================================================= #.
-
.automatically_create_package? ⇒ Boolean
# === RBT.automatically_create_package?.
-
.autoswitch_python? ⇒ Boolean
# === RBT.autoswitch_python?.
-
.available_programs?(extra_arguments = nil) ⇒ Boolean
# === RBT.available_programs?.
-
.batch_compile(i = ARGV, try_to_use_chained_programs = true) ⇒ Object
# === RBT.batch_compile.
-
.blfs(i = 'curl') ⇒ Object
# === RBT.blfs.
-
.build_type? ⇒ Boolean
# === RBT.build_type?.
-
.chained_programs?(i = RBT.file_cookbook_chained_programs) ⇒ Boolean
# === RBT.chained_programs?.
-
.change_directory(i) ⇒ Object
# === RBT.change_directory ========================================================================= #.
-
.check_and_report_whether_file_exists(i, optional_cookbook_object = nil) ⇒ Object
# === RBT.check_and_report_whether_file_exists.
-
.check_for_binary_duplicates ⇒ Object
# === RBT.check_for_binary_duplicates.
-
.check_for_invalid_entries_in_this_cookbook(i = ARGV) ⇒ Object
# === RBT.check_for_invalid_entries_in_this_cookbook.
-
.check_if_source_directories_exist ⇒ Object
# === RBT.check_if_source_directories_exist =========================================================================== #.
-
.check_this_cookbook_file_for_errors(this_file = "#{RUBY_SRC_RBT_COOKBOOKS}jasper.yml") ⇒ Object
# === RBT.check_this_cookbook_file_for_errors.
-
.check_whether_this_yaml_file_has_two_url1_entries(i = ARGV) ⇒ Object
# === RBT.check_whether_this_yaml_file_has_two_url1_entries.
-
.chmod(this_file, permission = 0755) ⇒ Object
# === RBT.chmod (chmod tag).
-
.chroot_compile(this_program = ARGV, use_this_as_prefix = '/Depot/Chroot/') ⇒ Object
# === RBT.chroot_compile.
-
.cliner(use_this_token = '=', use_this_colour = nil, &block) ⇒ Object
# === RBT.cliner.
-
.colour_make(&block) ⇒ Object
# === RBT.colour_make =========================================================================== #.
-
.colour_make_install(&block) ⇒ Object
# === RBT.colour_make_install =========================================================================== #.
-
.commandline_options? ⇒ Boolean
# === RBT.commandline_options? ========================================================================= #.
-
.compile_strategies? ⇒ Boolean
# === RBT.compile_strategies? =========================================================================== #.
-
.compile_these_programs? ⇒ Boolean
# === RBT.compile_these_programs? ========================================================================= #.
-
.compile_via_appdir_prefix_without_symlinking(i = ARGV) ⇒ Object
# === RBT.compile_via_appdir_prefix_without_symlinking.
-
.compile_via_environment_variable_as_prefix(compile_these_programs = ARGV, use_this_environment_variable = :default) ⇒ Object
# === RBT.compile_via_environment_variable_as_prefix =========================================================================== #.
-
.configuration? ⇒ Boolean
# === RBT.configuration?.
-
.configuration_directory? ⇒ Boolean
# === RBT.configuration_directory? ========================================================================= #.
-
.configuration_has_been_initialized_already? ⇒ Boolean
# === RBT.configuration_has_been_initialized_already? ========================================================================= #.
-
.configure_appdir_prefix(i = return_pwd) ⇒ Object
# === RBT.configure_appdir_prefix.
-
.configure_has_a_higher_priority_than_meson? ⇒ Boolean
# === RBT.configure_has_a_higher_priority_than_meson?.
-
.convert_global_env(i) ⇒ Object
# === RBT.convert_global_env ========================================================================= #.
-
.cookbook(i) ⇒ Object
# === RBT.cookbook.
-
.cookbook_aliases ⇒ Object
# === RBT.cookbook_aliases.
-
.cookbook_aliases? ⇒ Boolean
# === RBT.cookbook_aliases? ========================================================================= #.
-
.cookbook_directory? ⇒ Boolean
# === RBT.cookbook_directory?.
-
.copy_recursively(what, where_to = '/usr/', be_verbose = false) ⇒ Object
# === RBT.copy_recursively.
-
.create_appdir_skeleton(use_this_path = :default, &block) ⇒ Object
# === RBT.create_appdir_skeleton =========================================================================== #.
-
.create_cookbook_yaml_file(i = 'php') ⇒ Object
# === RBT.create_cookbook_yaml_file =========================================================================== #.
-
.create_directory(where = '/Depot/Packages/', use_this_mode = 0755, be_verbose = :be_quiet, do_use_opnn = true) ⇒ Object
# === RBT.create_directory.
-
.create_gobolinux_recipe(i = 'htop') ⇒ Object
# === RBT.create_gobolinux_recipe.
-
.create_html_page_for_these_programs(array = ARGV) ⇒ Object
# === RBT.create_html_page_for_these_programs.
-
.create_log_directory ⇒ Object
# === RBT.create_log_directory.
-
.create_program_version_url_file(also_show_last_update = :default) ⇒ Object
# === RBT.create_program_version_url_file.
-
.create_programs_version_html_file(use_this_file = "#{RBT.store_into_this_directory}programs_version.txt") ⇒ Object
# === RBT.create_programs_version_html_file.
-
.create_registered_tags ⇒ Object
# === RBT.create_registered_tags =========================================================================== #.
-
.create_shell_script_containing_these_program_versions ⇒ Object
# === RBT.create_shell_script_containing_these_program_versions =========================================================================== #.
-
.create_snapcraft_file(i) ⇒ Object
# === RBT.create_snapcraft_file.
-
.crimson(i) ⇒ Object
# === RBT.crimson ========================================================================= #.
-
.debug? ⇒ Boolean
# === RBT.debug?.
-
.depends_on_cmake?(i = nil) ⇒ Boolean
# === RBT.depends_on_cmake?.
-
.depends_on_ninja?(i = nil) ⇒ Boolean
# === RBT.depends_on_ninja? ========================================================================= #.
-
.depends_on_python?(i = nil) ⇒ Boolean
# === RBT.depends_on_python?.
-
.depends_on_waf?(i = nil) ⇒ Boolean
# === RBT.depends_on_waf? ========================================================================= #.
-
.depot_directory? ⇒ Boolean
# === RBT.depot_directory? ========================================================================= #.
-
.determine_appdir_prefix_from_this_input(name_of_the_program = 'htop', version_of_the_program = nil) ⇒ Object
# === RBT.determine_appdir_prefix_from_this_input.
-
.determine_available_programs ⇒ Object
# === RBT.determine_available_programs.
-
.determine_host_architecture ⇒ Object
# === RBT.determine_host_architecture.
-
.directory_expanded_cookbooks? ⇒ Boolean
# === RBT.directory_expanded_cookbooks?.
-
.disable_colours ⇒ Object
# === RBT.disable_colours.
-
.disable_md5sum_calculation ⇒ Object
# === RBT.disable_md5sum_calculation.
-
.disable_opn ⇒ Object
# === RBT.disable_opn ========================================================================= #.
-
.display_md5sum? ⇒ Boolean
# === RBT.display_md5sum?.
-
.do_compile(this_program) ⇒ Object
# === RBT::do_compile =========================================================================== #.
-
.do_not_register_into_the_yaml_database ⇒ Object
# === RBT.do_not_register_into_the_yaml_database =========================================================================== #.
-
.do_not_show_names ⇒ Object
# === RBT.do_not_show_names ========================================================================= #.
-
.do_not_show_names? ⇒ Boolean
# === RBT.do_not_show_names?.
-
.do_not_show_the_classname ⇒ Object
# === RBT.do_not_show_the_classname ========================================================================= #.
-
.do_show_the_classname ⇒ Object
# === RBT.do_show_the_classname ========================================================================= #.
-
.dodgerblue(i) ⇒ Object
# === RBT.dodgerblue ========================================================================= #.
-
.does_include_this_binary?(i, perform_a_deep_check = false) ⇒ Boolean
# === RBT.does_include_this_binary?.
-
.does_include_this_library?(i) ⇒ Boolean
# === RBT.does_include_this_library?.
-
.does_this_cookbook_file_have_any_erroneous_entry?(this_file = "#{RUBY_SRC_RBT_COOKBOOKS}jasper.yml") ⇒ Boolean
# === RBT.does_this_cookbook_file_have_any_erroneous_entry?.
-
.does_this_file_exist?(i = FILE_SCONS, prepend_this_for_the_check = nil) ⇒ Boolean
# === RBT.does_this_file_exist?.
-
.does_this_file_exist_and_is_it_a_file?(i) ⇒ Boolean
# === RBT.does_this_file_exist_and_is_it_a_file?.
-
.does_this_remote_url_exist?(i) ⇒ Boolean
# === RBT.does_this_remote_url_exist?.
-
.download(i = ARGV, optional_use_this_version = nil) ⇒ Object
# === RBT.download.
-
.download_all_source_archives(i = ARGV) ⇒ Object
# === RBT.download_all_source_archives ========================================================================= #.
-
.dual_compile(this_program = ARGV) ⇒ Object
# === RBT.dual_compile.
-
.e(i = '') ⇒ Object
# === RBT.e.
-
.editor?(i = @use_this_editor) ⇒ Boolean
# === RBT.editor? ========================================================================= #.
-
.email? ⇒ Boolean
# === RBT.email? ========================================================================= #.
-
.enable_md5sum_calculation ⇒ Object
# === RBT.enable_md5sum_calculation.
-
.enable_module_programs(also_add_reader_methods = true) ⇒ Object
# === RBT.enable_module_programs.
-
.enable_opn ⇒ Object
# === RBT.enable_opn ========================================================================= #.
-
.encoding? ⇒ Boolean
# === RBT.encoding?.
-
.ensure_that_the_required_directories_exist(use_this_as_directory = RBT.store_into_this_directory?, be_verbose = false) ⇒ Object
# === RBT.ensure_that_the_required_directories_exist.
-
.error_message? ⇒ Boolean
# === RBT.error_message? ========================================================================= #.
-
.esystem(i = '') ⇒ Object
# === RBT.esystem.
-
.ewarn(i = '') ⇒ Object
# === RBT.ewarn ========================================================================= #.
-
.expand_cookbooks(i = ARGV) ⇒ Object
# === RBT.expand_cookbooks.
-
.extract(i, extract_to_this_directory = return_pwd) ⇒ Object
# === RBT.extract.
-
.fast_return_file_size_of_this_program(i) ⇒ Object
# === RBT.fast_return_file_size_of_this_program.
-
.favicon? ⇒ Boolean
# === RBT.favicon?.
-
.feedback_available_programs ⇒ Object
# === RBT.feedback_available_programs.
-
.feedback_description_of(i) ⇒ Object
# === RBT.feedback_description_of.
-
.feedback_licenses ⇒ Object
# === RBT.feedback_licenses =========================================================================== #.
-
.feedback_program_description(i = ARGV) ⇒ Object
# === RBT.feedback_program_description.
-
.feedback_url(i = ARGV) ⇒ Object
# === RBT.feedback_url =========================================================================== #.
-
.file_allowed_tags ⇒ Object
# === RBT.file_allowed_tags.
-
.file_available_programs_versions ⇒ Object
# === RBT.file_available_programs_versions ========================================================================== #.
-
.file_colours ⇒ Object
# === RBT.file_colours ========================================================================= #.
-
.file_compiled_programs ⇒ Object
# === RBT.file_compiled_programs.
-
.file_compiled_programs? ⇒ Boolean
# === RBT.file_compiled_programs?.
-
.file_configure_database? ⇒ Boolean
# === RBT.file_configure_database? ========================================================================= #.
-
.file_cookbook_aliases ⇒ Object
# === RBT.file_cookbook_aliases.
-
.file_cookbook_chained_programs ⇒ Object
# === RBT.file_cookbook_chained_programs.
-
.file_database_installed_files ⇒ Object
# === RBT.file_database_installed_files.
-
.file_global_flags ⇒ Object
# === RBT.file_global_flags ========================================================================= #.
-
.file_installation_procedere ⇒ Object
# === RBT.file_installation_procedere.
-
.file_is_on_gobolinux ⇒ Object
# === RBT.file_is_on_gobolinux ========================================================================= #.
-
.file_last_compiled_program ⇒ Object
# === RBT.file_last_compiled_program ========================================================================= #.
-
.file_last_symlinked_program? ⇒ Boolean
# === RBT.file_last_symlinked_program? ========================================================================= #.
-
.file_predefined_installation_instructions(use_this_directory = RBT.project_yaml_directory?) ⇒ Object
# === RBT.file_predefined_installation_instructions.
-
.file_programs_directory ⇒ Object
# === RBT.file_programs_directory ========================================================================= #.
-
.file_programs_version ⇒ Object
# === RBT.file_programs_version ========================================================================== #.
-
.file_programs_version_url ⇒ Object
# === RBT.file_programs_version_url.
-
.file_registered_binaries ⇒ Object
# === RBT.file_registered_binaries.
-
.file_registered_cookbook_entries(use_this_directory = yaml_directory? ) ⇒ Object
# === RBT.file_registered_cookbook_entries.
-
.file_registered_gir_files ⇒ Object
# === RBT.file_registered_gir_files ========================================================================= #.
-
.file_registered_headers ⇒ Object
# === RBT.file_registered_headers ========================================================================= #.
-
.file_registered_libraries ⇒ Object
# === RBT.file_registered_libraries ========================================================================= #.
-
.file_registered_m4_files ⇒ Object
# === RBT.file_registered_m4_files ========================================================================= #.
-
.file_registered_pkgconfig_files ⇒ Object
# === RBT.file_registered_pkgconfig_files ========================================================================= #.
-
.file_registered_tags? ⇒ Boolean
# === RBT.file_registered_tags? ========================================================================= #.
-
.file_short_tutorial? ⇒ Boolean
# === RBT.file_short_tutorial? ========================================================================== #.
-
.file_source_directory ⇒ Object
# === RBT.file_source_directory ========================================================================= #.
-
.file_source_directory? ⇒ Boolean
# === RBT.file_source_directory?.
-
.file_specification_of_registered_cookbook_entries(use_this_directory = yaml_directory? ) ⇒ Object
# === RBT.file_specification_of_registered_cookbook_entries ========================================================================= #.
-
.file_status ⇒ Object
# === RBT.file_status ========================================================================= #.
-
.file_storing_the_time_it_took_to_compile_programs ⇒ Object
# === RBT.file_storing_the_time_it_took_to_compile_programs.
-
.file_temp_directory ⇒ Object
# === RBT.file_temp_directory.
-
.file_use_colours?(use_this_directory = @configuration_directory) ⇒ Boolean
# === RBT.file_use_colours?.
-
.file_use_psych_or_syck ⇒ Object
# === RBT.file_use_psych_or_syck ========================================================================= #.
-
.file_use_yaml_database_for_tags ⇒ Object
# === RBT.file_use_yaml_database_for_tags ========================================================================= #.
-
.filelist_parser(i) ⇒ Object
# === RBT.filelist_parser =========================================================================== #.
-
.find_alternative_archive(i = ARGV) ⇒ Object
# === RBT.find_alternative_archive =========================================================================== #.
-
.find_cookbook_alias_for(i) ⇒ Object
# === RBT.find_cookbook_alias_for.
-
.find_headers(i = ARGV) ⇒ Object
# === RBT.find_headers.
-
.find_multiple_versions ⇒ Object
# === RBT.find_multiple_versions =========================================================================== #.
-
.find_url_for(i = ARGV, return_as_string = false) ⇒ Object
# === RBT.find_url_for.
-
.fix_chown_root_entries_in_this_file(this_file = 'Makefile') ⇒ Object
# === RBT.fix_chown_root_entries_in_this_file.
-
.fix_incorrect_symlinks ⇒ Object
# === RBT.fix_incorrect_symlinks ========================================================================= #.
-
.fix_libtool_la_file_from_saved_file ⇒ Object
# === RBT.fix_libtool_la_file_from_saved_file =========================================================================== #.
-
.forestgreen(i = '') ⇒ Object
# === RBT.forestgreen ========================================================================= #.
-
.generate_global_yaml_database ⇒ Object
# === RBT.generate_global_yaml_database =========================================================================== #.
-
.generate_pdf_tutorial ⇒ Object
# === RBT.generate_pdf_tutorial =========================================================================== #.
-
.generate_pdf_tutorial_then_upload_it ⇒ Object
# === RBT.generate_pdf_tutorial_then_upload_it.
-
.generate_programs_version_yaml_file(use_this_dataset = nil) ⇒ Object
# === RBT.generate_programs_version_yaml_file.
-
.generate_slackware_description_file(i, &block) ⇒ Object
# === RBT.generate_slackware_description_file =========================================================================== #.
-
.get_all_directories_from(here = return_pwd, return_full_path = false) ⇒ Object
# === RBT.get_all_directories_from.
-
.get_all_files_from(this_dir = return_pwd, return_full_path = true, include_hidden_files = false) ⇒ Object
# === RBT.get_all_files_from.
-
.get_date ⇒ Object
# === RBT.get_date.
-
.get_files_and_directories_from(here = return_pwd) ⇒ Object
# === RBT.get_files_and_directories_from.
-
.gobolinux_naming_convention(i) ⇒ Object
# === RBT.gobolinux_naming_convention.
-
.gold(i = '') ⇒ Object
# === RBT.gold ========================================================================= #.
-
.handle_this_extract_related_user_input(i) ⇒ Object
# === RBT.handle_this_extract_related_user_input.
-
.has_an_error_occurred? ⇒ Boolean
# === RBT.has_an_error_occurred? ========================================================================= #.
-
.hash_aliases_to_the_available_programs? ⇒ Boolean
# === RBT.hash_aliases_to_the_available_programs?.
-
.hash_registered_binaries? ⇒ Boolean
# === RBT.hash_registered_binaries?.
-
.highest(n = DISPLAY_N_PROGRAMS_BY_DEFAULT) ⇒ Object
# === RBT.highest.
-
.home_dir? ⇒ Boolean
# === RBT.home_dir?.
-
.host_cpu? ⇒ Boolean
# === RBT.host_cpu? ========================================================================= #.
-
.infer_build_system(i = :infer_automatically, program_path = nil, depends_on = nil, optional_hash = {}) ⇒ Object
# === RBT.infer_build_system.
-
.infer_these_binaries_will_be_installed_by(this_program = ARGV) ⇒ Object
# === RBT.infer_these_binaries_will_be_installed_by.
-
.infer_these_libraries_will_be_installed_by(this_program = ARGV) ⇒ Object
# === RBT.infer_these_libraries_will_be_installed_by.
-
.initialize_configuration ⇒ Object
# === RBT.initialize_configuration.
-
.install_libstdc_plus_plus(shall_we_extract_the_tarball = true, use_this_gcc_version = '10.1.0', to = RBT.log_dir?, use_this_as_target_prefix = RBT.programs_directory?) ⇒ Object
# === RBT.install_libstdc_plus_plus.
-
.install_this_rubygem(i) ⇒ Object
# === RBT.install_this_rubygem =========================================================================== #.
-
.is_an_abbreviation?(i) ⇒ Boolean
# === RBT.is_an_abbreviation?.
-
.is_an_alias?(i) ⇒ Boolean
# === RBT.is_an_alias?.
-
.is_an_archive?(i) ⇒ Boolean
# === RBT.is_an_archive?.
-
.is_included?(i, honour_aliases = true) ⇒ Boolean
# === RBT.is_included?.
-
.is_on_64_bit? ⇒ Boolean
# === RBT.is_on_64_bit? ========================================================================= #.
-
.is_on_windows? ⇒ Boolean
# === RBT.is_on_windows?.
-
.is_roebe? ⇒ Boolean
# === RBT.is_roebe?.
-
.is_this_a_real_gobolinux_system? ⇒ Boolean
# === RBT.is_this_a_real_gobolinux_system?.
-
.is_this_a_registered_gir_file?(i = 'Gtk+-3.0.gir') ⇒ Boolean
# === RBT.is_this_a_registered_gir_file? =========================================================================== #.
-
.is_this_a_registered_m4_file?(i = 'pkg.m4') ⇒ Boolean
# === RBT.is_this_a_registered_m4_file? =========================================================================== #.
-
.is_this_a_registered_pkgconfig_file?(i = 'xau.pc') ⇒ Boolean
# === RBT.is_this_a_registered_pkgconfig_file? =========================================================================== #.
-
.is_this_header_included?(i) ⇒ Boolean
# === RBT.is_this_header_included? =========================================================================== #.
-
.is_this_partial_header_included?(i) ⇒ Boolean
# === RBT.is_this_partial_header_included? =========================================================================== #.
-
.is_this_program_included?(this_program, optional_argument = nil) ⇒ Boolean
# === RBT.is_this_program_included? This method can be used to determine whether the given input argument to this method is a registered program; aka whether this program is included as part of the RBT project.
-
.last_update? ⇒ Boolean
# === RBT.last_update? ========================================================================= #.
-
.libtool(i = ARGV) ⇒ Object
# === RBT.libtool.
-
.lightblue(i) ⇒ Object
# === RBT.lightblue ========================================================================= #.
-
.lightgreen(i = '') ⇒ Object
# === RBT.lightgreen ========================================================================= #.
-
.lightsalmon(i = '') ⇒ Object
# === RBT.lightsalmon ========================================================================= #.
-
.load_yaml(i) ⇒ Object
# === RBT.load_yaml.
-
.log_directory? ⇒ Boolean
# === RBT.log_directory?.
-
.make_app_prefix(for_this_program = :infer) ⇒ Object
# === RBT.make_app_prefix.
-
.map_this_input_to_that_registered_program(i = ARGV) ⇒ Object
# === RBT.map_this_input_to_that_registered_program.
-
.mediumseagreen(i = '') ⇒ Object
# === RBT.mediumseagreen ========================================================================= #.
-
.mediumslateblue(i) ⇒ Object
# === RBT.mediumslateblue ========================================================================= #.
-
.meson_appdir_prefix(i = :use_cwd_as_input) ⇒ Object
# === RBT.meson_appdir_prefix.
-
.meson_build_file_exists?(check_for_this_file = 'meson.build', prepend_this_for_the_check = nil) ⇒ Boolean
# === RBT.meson_build_file_exists?.
-
.n_padding_to_use_for_opn? ⇒ Boolean
# === RBT.n_padding_to_use_for_opn? ========================================================================= #.
-
.n_programs_available? ⇒ Boolean
# === RBT.n_programs_available?.
-
.new_url_action(input = nil, run_already = true) ⇒ Object
# === RBT.new_url_action.
-
.no_file_exists_at(i) ⇒ Object
# === RBT.no_file_exists_at ========================================================================= #.
-
.no_trad_no_symlink(these_programs = ARGV) ⇒ Object
# === RBT.no_trad_no_symlink.
-
.ntrad(i = ARGV) ⇒ Object
# === RBT.ntrad =========================================================================== #.
-
.opn(i = NAMESPACE, &block) ⇒ Object
# === RBT.opn (opn tag, opnn tag).
-
.orange(i = '') ⇒ Object
# === RBT.orange ========================================================================= #.
-
.packages_directory? ⇒ Boolean
# === RBT.packages_directory? ========================================================================= #.
-
.patch(i) ⇒ Object
# === RBT.patch.
-
.permanently_disable_colours ⇒ Object
# === RBT.permanently_disable_colours.
-
.permanently_set_source_directory(i) ⇒ Object
# === RBT.permanently_set_source_directory.
-
.permanently_set_temp_directory(i) ⇒ Object
# === RBT.permanently_set_temp_directory.
-
.pin_this_program(i) ⇒ Object
# === RBT.pin_this_program.
-
.pkgconfig_directory? ⇒ Boolean
# === RBT.pkgconfig_directory ========================================================================= #.
-
.predefined_installation_instructions? ⇒ Boolean
# === RBT.predefined_installation_instructions? ========================================================================= #.
-
.prefix? ⇒ Boolean
# === RBT.prefix? =========================================================================== #.
-
.programs_directory? ⇒ Boolean
# === RBT.programs_directory?.
-
.project_base_directory? ⇒ Boolean
# === RBT.project_base_directory?.
-
.project_yaml_dir? ⇒ Boolean
# === RBT.project_yaml_dir?.
-
.publish_list_of_all_programs_version(file_programs_version = FILE_PROGRAMS_VERSION) ⇒ Object
# === RBT.publish_list_of_all_programs_version.
-
.query_binary_to_package(i = '/usr/bin/') ⇒ Object
# === RBT.query_binary_to_package.
-
.query_header_to_package(i = '/usr/include/') ⇒ Object
# === RBT.query_header_to_package.
-
.raw_cookbook(i = ARGV, &block) ⇒ Object
# === RBT.raw_cookbook.
-
.rds(i) ⇒ Object
# === RBT.rds.
-
.register_program_files_into_yaml_database? ⇒ Boolean
# === RBT.register_program_files_into_yaml_database? =========================================================================== #.
-
.registered_binaries? ⇒ Boolean
# === RBT.registered_binaries?.
-
.registered_cookbook_entries? ⇒ Boolean
# === RBT.registered_cookbook_entries?.
-
.registered_gir_files? ⇒ Boolean
# === RBT.registered_gir_files? =========================================================================== #.
-
.registered_libraries? ⇒ Boolean
# RBT.registered_libraries? =========================================================================== #.
-
.registered_m4_files? ⇒ Boolean
# === RBT.registered_m4_files? =========================================================================== #.
-
.registered_pkgconfig_files? ⇒ Boolean
# === RBT.registered_pkgconfig_files? =========================================================================== #.
-
.remove_archive_from_the_end(i) ⇒ Object
# === RBT.remove_archive_from_the_end.
-
.remove_empty_directories(i = :current_working_directory) ⇒ Object
# === RBT.remove_empty_directories =========================================================================== #.
-
.remove_file(file, report_action = false) ⇒ Object
# === RBT.remove_file.
-
.remove_file_extension(i) ⇒ Object
# === RBT.remove_file_extension.
-
.remove_libtool_files_from(this_directory = '') ⇒ Object
# === RBT.remove_libtool_files_from.
-
.report_all_registered_programs_of_homebrew ⇒ Object
# === RBT.report_all_registered_programs_of_homebrew ========================================================================= #.
-
.report_extended_information_about_this_program(i) ⇒ Object
# === RBT.report_extended_information_about_this_program.
-
.report_how_many_binaries_are_registered ⇒ Object
# === RBT.report_how_many_binaries_are_registered.
-
.report_how_many_cookbook_entries_exist ⇒ Object
# === RBT.report_how_many_cookbook_entries_exist ========================================================================= #.
-
.report_mate_desktop_version(i = ARGV) ⇒ Object
# === RBT.report_mate_desktop_version.
-
.report_n_programs_available ⇒ Object
# === RBT.report_n_programs_available ========================================================================= #.
-
.report_rbt_version(optional_additional_activities = nil) ⇒ Object
# === RBT.report_rbt_version.
-
.report_the_registered_programs(i = ARGV) ⇒ Object
# === RBT.report_the_registered_programs ========================================================================= #.
-
.report_total_size_of_all_archives ⇒ Object
# === RBT.report_total_size_of_all_archives.
-
.report_where_the_cookbook_directory_can_be_found ⇒ Object
# === RBT.report_where_the_cookbook_directory_can_be_found.
-
.report_xfce_version ⇒ Object
# === RBT.report_xfce_version.
-
.require_base_scripts ⇒ Object
# === RBT.require_base_scripts ========================================================================= #.
-
.require_the_classes_for_individual_programs ⇒ Object
# === RBT.require_the_classes_for_individual_programs ========================================================================= #.
-
.require_the_cookbook_utility_scripts ⇒ Object
# === RBT.require_the_cookbook_utility_scripts ========================================================================= #.
-
.require_the_generate_files_classes ⇒ Object
# === RBT.require_the_generate_files_classes ========================================================================= #.
-
.require_the_registered_components ⇒ Object
# === RBT.require_the_registered_components.
-
.require_the_toplevel_methods ⇒ Object
# === RBT.require_the_toplevel_methods ========================================================================= #.
-
.require_the_validation_scripts ⇒ Object
# === RBT.require_the_validation_scripts.
-
.require_utility_scripts ⇒ Object
# === RBT.require_utility_scripts ========================================================================= #.
-
.reset_error_message ⇒ Object
# === RBT.reset_error_message ========================================================================= #.
-
.return_alias_program_name_for(i) ⇒ Object
# === RBT.return_alias_program_name_for.
-
.return_all_abbreviations_of_this_array(i = determine_available_programs) ⇒ Object
# === RBT.return_all_abbreviations_of_this_array.
-
.return_all_archives_from_this_directory(i) ⇒ Object
# === RBT.return_all_archives_from_this_directory.
-
.return_all_blfs_entries ⇒ Object
# === RBT.return_all_blfs_entries.
-
.return_all_registered_programs_of_homebrew ⇒ Object
# === RBT.return_all_registered_programs_of_homebrew ========================================================================= #.
-
.return_archive_type(i = '.tar.xz') ⇒ Object
# === RBT.return_archive_type.
-
.return_array_of_programs_without_a_blfs_entry ⇒ Object
# === RBT.return_array_of_programs_without_a_blfs_entry.
-
.return_array_of_this_tag(i) ⇒ Object
# === RBT.return_array_of_this_tag.
-
.return_as_string_the_available_programs_versions ⇒ Object
# === RBT.return_as_string_the_available_programs_versions =========================================================================== #.
-
.return_base_directory_of_this_program(i) ⇒ Object
# === RBT.return_base_directory_of_this_program.
-
.return_binaries_of_this_program(i) ⇒ Object
# === RBT.return_binaries_of_this_program.
-
.return_blfs_page_of_this_program(this_program = 'gcc') ⇒ Object
# === RBT.return_blfs_page_of_this_program.
-
.return_configuration_options_for?(this_program) ⇒ Boolean
# === RBT.return_configuration_options_for?.
-
.return_cookbook_dataset_for(i) ⇒ Object
# === RBT.return_cookbook_dataset_for =========================================================================== #.
-
.return_cookbook_for(i = :lua) ⇒ Object
# === RBT.return_cookbook_for =========================================================================== #.
-
.return_date ⇒ Object
# === RBT.return_date.
-
.return_games_components ⇒ Object
# === RBT.return_games_components.
-
.return_gnome1 ⇒ Object
# === return_gnome1 ========================================================================= #.
-
.return_gnome2 ⇒ Object
# === return_gnome2 ========================================================================= #.
-
.return_gnome3 ⇒ Object
# === return_gnome3 ========================================================================= #.
-
.return_gnome4 ⇒ Object
# === return_gnome4 ========================================================================= #.
-
.return_gnome5 ⇒ Object
# === RBT.return_gnome5 ========================================================================= #.
-
.return_gnome_components ⇒ Object
# === return_gnome_components.
-
.return_gtk_widget(which_widget = :compile_program) ⇒ Object
# === RBT.return_gtk_widget.
-
.return_kde5_applications ⇒ Object
# === RBT.return_kde5_applications.
-
.return_kde5_foundation ⇒ Object
# === RBT.return_kde5_foundation.
-
.return_kde5_plasma ⇒ Object
# === RBT.return_kde5_plasma.
-
.return_kde5_porting_aids ⇒ Object
# === RBT.return_kde5_porting_aids.
-
.return_kde5_portingaids(i = 1) ⇒ Object
# === RBT.return_kde5_portingaids ========================================================================= #.
-
.return_location_to_this_programs_yaml_file(i) ⇒ Object
# === RBT.return_location_to_this_programs_yaml_file.
-
.return_lxqt_components ⇒ Object
# === RBT.return_lxqt_components.
-
.return_mate_desktop_components ⇒ Object
# === RBT.return_mate_desktop_components.
-
.return_mate_desktop_version_array ⇒ Object
# === RBT.return_mate_desktop_version_array (array tag).
-
.return_mate_desktop_version_string ⇒ Object
# === RBT.return_mate_desktop_version_string.
-
.return_post_xorg_server_components ⇒ Object
# === RBT.return_post_xorg_server_components ========================================================================= #.
-
.return_program_name_and_program_version_from_this_github_url(i = 'https://github.com/commonmark/cmark/archive/0.29.0.tar.gz', use_this_as_the_program_name = nil) ⇒ Object
# === RBT.return_program_name_and_program_version_from_this_github_url.
-
.return_programs_from_this_url(i) ⇒ Object
# === RBT.return_programs_from_this_url.
-
.return_programs_that_are_exlusively_registered_in_the_homebrew_programs ⇒ Object
# === RBT.return_programs_that_are_exlusively_registered_in_the_homebrew_programs.
-
.return_pwd ⇒ Object
# === RBT.return_pwd ========================================================================= #.
-
.return_remote_url_from_this_input(remote_url = 'http://ftp.gnu.org/gnu/glibc/glibc-2.29.tar.xz', version = '2.28') ⇒ Object
# === RBT.return_remote_url_from_this_input.
-
.return_string_containing_all_program_versions ⇒ Object
# === RBT.return_string_containing_all_program_versions.
-
.return_string_containing_all_program_versions_the_last_update_and_the_remote_URL ⇒ Object
# === RBT.return_string_containing_all_program_versions_the_last_update_and_the_remote_URL.
-
.return_string_showing_the_last_updated_programs ⇒ Object
# === RBT.return_string_showing_the_last_updated_programs.
-
.return_the_associated_program_of_this_gir_file(i) ⇒ Object
# === RBT.return_the_associated_program_of_this_gir_file.
-
.return_the_associated_program_of_this_m4_file(i) ⇒ Object
# === RBT.return_the_associated_program_of_this_m4_file.
-
.return_the_associated_program_of_this_pkgconfig_file(i) ⇒ Object
# === RBT.return_the_associated_program_of_this_pkgconfig_file.
-
.return_the_program_belonging_to_this_header_file(i) ⇒ Object
# === RBT.return_the_program_belonging_to_this_header_file.
-
.return_this_game_component(i) ⇒ Object
# === RBT.return_this_game_component.
-
.return_this_gnome_component(i = 1) ⇒ Object
# === RBT.return_this_gnome_component.
-
.return_this_kde_component(i = 1) ⇒ Object
# === RBT.return_this_kde_component.
-
.return_this_lxqt_component(i) ⇒ Object
# === RBT.return_this_lxqt_component.
-
.return_this_mate_component(i = 1) ⇒ Object
# === RBT.return_this_mate_component.
-
.return_this_plasma_component(i = 1) ⇒ Object
# === RBT.return_this_plasma_component.
-
.return_this_xfce_component(i) ⇒ Object
# === RBT.return_this_xfce_component.
-
.return_this_xorg_component(i) ⇒ Object
# === RBT.return_this_xorg_component.
-
.return_time ⇒ Object
# === RBT.return_time.
-
.return_url1_of_this_program(i = 'ruby') ⇒ Object
# === RBT.return_url1_of_this_program.
-
.return_version_of_this_program(i = 'htop') ⇒ Object
# === RBT.return_version_of_this_program.
-
.return_xfce_components ⇒ Object
# === RBT.return_xfce_components.
-
.return_xfce_version_array ⇒ Object
# === RBT.return_xfce_version_array (array tag).
-
.return_xfce_version_string ⇒ Object
# === RBT.return_xfce_version_string.
-
.return_xorg_apps ⇒ Object
# === RBT.return_xorg_apps ========================================================================= #.
-
.return_xorg_components ⇒ Object
# === RBT.return_xorg_components.
-
.return_xorg_data ⇒ Object
# === RBT.return_xorg_data ========================================================================= #.
-
.return_xorg_fonts ⇒ Object
# === RBT.return_xorg_fonts ========================================================================= #.
-
.return_xorg_libraries ⇒ Object
# === RBT.return_xorg_libraries ========================================================================= #.
-
.return_xorg_protos ⇒ Object
# === RBT.return_xorg_protos ========================================================================= #.
-
.return_xorg_server ⇒ Object
# === RBT.return_xorg_server ========================================================================= #.
-
.return_xorg_server_libraries ⇒ Object
# === RBT.return_xorg_server_libraries ========================================================================= #.
-
.return_xorg_utils ⇒ Object
# === RBT.return_xorg_utils ========================================================================= #.
-
.returned_chained_programs_of_the_mate_desktop ⇒ Object
# === RBT.returned_chained_programs_of_the_mate_desktop.
-
.rev(use_colours = use_colours? ) ⇒ Object
# === RBT.rev ========================================================================= #.
-
.royalblue(i = '') ⇒ Object
# === RBT.royalblue ========================================================================= #.
-
.run_app ⇒ Object
# === RBT.run_app =========================================================================== #.
-
.run_make_then_make_install ⇒ Object
# === RBT.run_make_then_make_install.
-
.run_makepkg_command(i = :from_the_current_working_directory, optional_program_version = nil, use_this_architecture = RBT.determine_host_architecture) ⇒ Object
# === RBT.run_makepkg_command.
-
.sanitize_url1_entry(i, hash = {}) ⇒ Object
# === RBT.sanitize_url1_entry.
-
.save_the_available_programs_versions ⇒ Object
# === RBT.save_the_available_programs_versions =========================================================================== #.
-
.scan_for_missing_last_update_entries ⇒ Object
# === RBT.scan_for_missing_last_update_entries =========================================================================== #.
-
.sdir(i = '') ⇒ Object
# === RBT.sdir ========================================================================= #.
-
.search_for_tags(i) ⇒ Object
# === RBT.search_for_tags.
-
.set_array_these_ruby_gems_were_updated(i) ⇒ Object
# === RBT.set_array_these_ruby_gems_were_updated.
-
.set_commandline_options(i) ⇒ Object
# === RBT.set_commandline_options ========================================================================= #.
-
.set_compile_these_programs(i) ⇒ Object
# === RBT.set_compile_these_programs.
-
.set_compile_this_as_first_program(i) ⇒ Object
# === RBT.set_compile_this_as_first_program ========================================================================= #.
-
.set_configuration(i = RBT::Configuration::SimpleConfigurationLoader.new) ⇒ Object
# === RBT.set_configuration.
-
.set_configuration_directory(i) ⇒ Object
# === RBT.set_configuration_directory ========================================================================= #.
-
.set_cookbook_directory(i) ⇒ Object
# === RBT.set_cookbook_directory.
-
.set_depot_directory(i = '/Depot/') ⇒ Object
# === RBT.set_depot_directory ========================================================================= #.
-
.set_error_message(i = nil) ⇒ Object
# === RBT.set_error_message.
-
.set_log_directory(i = "#{RBT.temp_directory}rbt/") ⇒ Object
# === RBT.set_log_directory.
-
.set_packages_directory(i = '/Depot/Packages/') ⇒ Object
# === RBT.set_packages_directory ========================================================================= #.
-
.set_pkgconfig_directory(i = '/usr/lib/pkgconfig/') ⇒ Object
# === RBT.set_pkgconfig_directory ========================================================================= #.
-
.set_prefix(i) ⇒ Object
# === RBT.set_prefix =========================================================================== #.
-
.set_programs_directory(i = :use_value_from_the_configuration_file) ⇒ Object
# === RBT.set_programs_directory ========================================================================= #.
-
.set_register_program_files_into_yaml_database(i) ⇒ Object
# === RBT.set_register_program_files_into_yaml_database =========================================================================== #.
-
.set_show_names(i = true) ⇒ Object
# === RBT.set_show_names ========================================================================= #.
-
.set_source_base_directory(i = :default_but_consider_environment_variables) ⇒ Object
# === RBT.set_source_base_directory.
-
.set_sysbin_directory(i = '/System/Index/bin/') ⇒ Object
# === RBT.set_sysbin_directory ========================================================================= #.
-
.set_sysetc_directory(i = '/System/Index/etc/') ⇒ Object
# === RBT.set_sysetc_directory ========================================================================= #.
-
.set_sysinclude_directory(i = '/System/Index/include/') ⇒ Object
# === RBT.set_sysinclude_directory ========================================================================= #.
-
.set_syslib_directory(i = :infer_which_path_to_use_for_syslib) ⇒ Object
# === RBT.set_syslib_directory ========================================================================= #.
-
.set_system_directory(i = '/System/') ⇒ Object
# === RBT.set_system_directory ========================================================================= #.
-
.set_system_settings_directory(i = '/System/Settings/') ⇒ Object
# === RBT.set_system_settings_directory ========================================================================= #.
-
.set_system_share_directory(i = '/System/Share/') ⇒ Object
# === RBT.set_system_share_directory ========================================================================= #.
-
.set_temp_directory(i = '/tmp/') ⇒ Object
# === RBT.set_temp_directory ========================================================================= #.
-
.set_use_this_editor(i) ⇒ Object
# === RBT.set_use_this_editor ========================================================================= #.
-
.set_xorg_buffer(i) ⇒ Object
# === RBT.set_xorg_buffer ========================================================================= #.
-
.set_yaml_engine(i) ⇒ Object
# === RBT.set_yaml_engine.
-
.sfancy(i = '') ⇒ Object
# === RBT.sfancy ========================================================================= #.
-
.sfile(i = '') ⇒ Object
# === RBT.sfile ========================================================================= #.
-
.show_available_tags(use_this_path = :default, show_namespace = true) ⇒ Object
# === RBT.show_available_tags ========================================================================= #.
-
.show_available_utility_scripts ⇒ Object
# === RBT.show_available_utility_scripts.
-
.show_compile_chain(of = ARGV) ⇒ Object
# === RBT.show_compile_chain.
-
.show_compile_time_statistics ⇒ Object
# === RBT.show_compile_time_statistics.
-
.show_dependencies_of(i = ARGV) ⇒ Object
# === RBT.show_dependencies_of =========================================================================== #.
-
.show_how_many_files_are_tracked ⇒ Object
# === RBT.show_how_many_files_are_tracked =========================================================================== #.
-
.show_last_configure_option ⇒ Object
# === RBT.show_last_configure_option ========================================================================= #.
-
.show_names? ⇒ Boolean
# === RBT.show_names? ========================================================================= #.
-
.show_overview_over_available_utility_scripts ⇒ Object
# === RBT.show_overview_over_available_utility_scripts.
-
.show_registered_binaries ⇒ Object
# === RBT.show_registered_binaries =========================================================================== #.
-
.show_the_classname? ⇒ Boolean
# === RBT.show_the_classname?.
-
.show_the_gnome_ftp_listing(show_n_results = 40) ⇒ Object
# === RBT.show_the_gnome_ftp_listing.
-
.show_tutorial(try_to_use_colours = true) ⇒ Object
# === RBT.show_tutorial.
-
.simp(i = '') ⇒ Object
# === RBT.simp ========================================================================= #.
-
.simple_appdir_configure(from = return_pwd) ⇒ Object
# === RBT.simple_appdir_configure.
-
.slateblue(i = '') ⇒ Object
# === RBT.slateblue ========================================================================= #.
-
.source_base_directory? ⇒ Boolean
# === RBT.source_base_directory?.
-
.stderr(i = '', use_puts_or_print = :puts) ⇒ Object
# === RBT.stderr.
-
.steelblue(i = '') ⇒ Object
# === RBT.steelblue ========================================================================= #.
-
.store_abbreviations ⇒ Object
# === RBT.store_abbreviations.
-
.store_the_last_configuration_options_in_this_file ⇒ Object
# === RBT.store_the_last_configuration_options_in_this_file.
-
.store_the_string_into_a_md_file ⇒ Object
# === RBT.store_the_string_into_a_md_file.
-
.suggest_cookbook_for(this_program = ARGV) ⇒ Object
# === RBT.suggest_cookbook_for.
-
.swarn(i = '') ⇒ Object
# === RBT.swarn ========================================================================= #.
-
.swift_return_version_of_this_program(this_program = :htop) ⇒ Object
# === RBT.swift_return_version_of_this_program.
-
.symlink(existing, new_location = nil, be_verbose = true, use_colours = RBT.use_colours?) ⇒ Object
# === RBT.symlink (symlink tag).
-
.symlink_appdir_libraries_into_usr_lib_directory(from_this_appdir_library_target) ⇒ Object
# === RBT.symlink_appdir_libraries_into_usr_lib_directory The following method is very specialized - it will symlink all entries under lib/* into the /usr/lib/ hierarchy.
-
.symlink_this_program(i = ARGV) ⇒ Object
# === RBT.symlink_this_program.
-
.sysbin_directory? ⇒ Boolean
# === RBT.sysbin_directory? ========================================================================= #.
-
.sysetc_directory? ⇒ Boolean
# === RBT.sysetc_directory? ========================================================================= #.
-
.sysinclude_directory? ⇒ Boolean
# === RBT.sysinclude_directory? ========================================================================= #.
-
.syslib_directory? ⇒ Boolean
# === RBT.syslib_directory? ========================================================================= #.
-
.system_directory? ⇒ Boolean
# === RBT.system_directory? ========================================================================= #.
-
.system_settings_directory? ⇒ Boolean
# === RBT.system_settings_directory? ========================================================================= #.
-
.system_share_directory? ⇒ Boolean
# === RBT.system_share_directory? ========================================================================= #.
-
.system_tags? ⇒ Boolean
# === RBT.system_tags?.
-
.temp_directory? ⇒ Boolean
# === RBT.temp_directory? Preferentially use this method if you wish to find out the path to the temporary directory in use by the RBT project.
-
.test_this_alias(i) ⇒ Object
# === RBT.test_this_alias.
-
.this_library_to_that_program(i) ⇒ Object
# === RBT.this_library_to_that_program.
-
.to_bool(i) ⇒ Object
# === RBT.to_bool ========================================================================= #.
-
.to_current(i = ARGV) ⇒ Object
# === RBT.to_current =========================================================================== #.
-
.tomato(i) ⇒ Object
# === RBT.tomato ========================================================================= #.
-
.toplevel_methods? ⇒ Boolean
# === RBT.toplevel_methods?.
-
.try_to_find_shortcut_for_a_chain_compiled_program(i) ⇒ Object
# === RBT.try_to_find_shortcut_for_a_chain_compiled_program.
-
.try_to_return_a_special_compile_component(i) ⇒ Object
# === RBT.try_to_return_a_special_compile_component.
-
.turquoise(i) ⇒ Object
# === RBT.turquoise ========================================================================= #.
-
.uchroot_compile(these_programs = ARGV) ⇒ Object
# === RBT.uchroot_compile.
-
.unicode_cliner(use_this_token = '=', use_this_colour = nil, &block) ⇒ Object
# === RBT.unicode_cliner.
-
.unpin_this_program(i) ⇒ Object
# === RBT.unpin_this_program ========================================================================= #.
-
.update_all_ruby_gems ⇒ Object
# === RBT.update_all_ruby_gems.
-
.update_entry(i = ARGV) ⇒ Object
# === RBT.update_entry.
-
.update_kde_plasma(i = ARGV) ⇒ Object
# === RBT.update_kde_plasma =========================================================================== #.
-
.update_lxqt(i = ARGV) ⇒ Object
# === RBT.update_lxt =========================================================================== #.
-
.update_these_rubygems(array_to_use = RBT.array_all_rubygems) ⇒ Object
# === RBT.update_these_rubygems.
-
.upload_list_of_all_programs_version(this_file = RBT.store_into_this_directory+'programs_version.txt', type = :txt) ⇒ Object
# === RBT.upload_list_of_all_programs_version.
-
.use_colours? ⇒ Boolean
# === RBT.use_colours?.
-
.use_opn? ⇒ Boolean
# === RBT.use_opn? ========================================================================= #.
-
.use_yaml_database_for_tags? ⇒ Boolean
# === RBT.use_yaml_database_for_tags? ========================================================================= #.
-
.utility_scripts? ⇒ Boolean
# === RBT.utility_scripts?.
-
.validate_entries ⇒ Object
# === RBT.validate_entries.
-
.validation_scripts? ⇒ Boolean
# === RBT.validation_scripts?.
-
.verbose_truth(i = 'true', optional_arguments = nil) ⇒ Object
# === RBT.verbose_truth.
-
.version? ⇒ Boolean
# === RBT.version? ========================================================================= #.
-
.violet(i = '') ⇒ Object
# === RBT.violet ========================================================================= #.
-
.will_install_which_binaries? ⇒ Boolean
# === RBT.will_install_which_binaries?.
-
.wrap_at(this_string, my_limit = N_CHARACTERS_PER_LINE, add_newline = true, add_padding = nil) ⇒ Object
# === RBT.wrap_at (Begrenzung tag, limit tag, boundary tag).
-
.write_what_into(what, into, use_these_permissions = :default) ⇒ Object
# === RBT.write_what_into ========================================================================= #.
-
.write_what_into_via_unicode(what, into, use_these_permissions = :default) ⇒ Object
# === RBT.write_what_into_via_unicode ========================================================================= #.
-
.yaml_directory_for_the_registered_yaml_files? ⇒ Boolean
# === RBT.yaml_directory_for_the_registered_yaml_files? =========================================================================== #.
-
.yaml_engine? ⇒ Boolean
# === RBT.yaml_engine? ========================================================================== #.
Instance Method Summary collapse
-
#all_binaries? ⇒ Boolean
# === all_binaries? ========================================================================= #.
-
#all_libraries? ⇒ Boolean
# === all_libraries? ========================================================================= #.
-
#all_tags? ⇒ Boolean
# === all_tags? ========================================================================= #.
-
#bold_blue(i) ⇒ Object
# === bold_blue ========================================================================= #.
-
#bold_green(i) ⇒ Object
# === bold_green ========================================================================= #.
-
#get_file_listing(a = return_pwd, b = true, c = false) ⇒ Object
(also: #get_all_files_from, #get_files_from, #get_files)
# === get_file_listing.
-
#home_dir? ⇒ Boolean
# === home_dir? ========================================================================== #.
-
#individual_cookbooks_directory? ⇒ Boolean
(also: #cookbooks_directory?)
# === individual_cookbooks_directory? ========================================================================= #.
-
#is_roebe? ⇒ Boolean
(also: #is_on_roebe?, #on_roebe?)
# === is_on_roebe? ========================================================================== #.
-
#load_yaml(i) ⇒ Object
# === load_yaml ========================================================================== #.
-
#project_dir? ⇒ Boolean
# === project_dir? ========================================================================= #.
-
#rbt_version? ⇒ Boolean
# === rbt_version? ========================================================================= #.
-
#rbt_yaml_directory? ⇒ Boolean
(also: #cookbooks_yaml_directory?)
# === rbt_yaml_directory? ========================================================================= #.
-
#registered_cookbook_entries? ⇒ Boolean
# === registered_cookbook_entries?.
-
#return_chained_programs ⇒ Object
# === return_chained_programs ========================================================================= #.
-
#sdir(i = '') ⇒ Object
# === sdir ========================================================================= #.
-
#sfancy(i = '') ⇒ Object
# === sfancy ========================================================================= #.
-
#sfile(i = '') ⇒ Object
# === sfile ========================================================================= #.
-
#simp(i = '') ⇒ Object
# === simp ========================================================================= #.
-
#swarn(i = '') ⇒ Object
# === swarn ========================================================================= #.
-
#toplevel_methods? ⇒ Boolean
# === toplevel_methods? ========================================================================= #.
-
#utility_scripts? ⇒ Boolean
# === utility_scripts ========================================================================= #.
-
#validation_scripts? ⇒ Boolean
# === validation_scripts ========================================================================= #.
Class Method Details
.all_binaries? ⇒ Boolean
#
RBT.all_binaries?
Get back all registered binaries.
This is guaranteed to return a Hash.
#
46 47 48 |
# File 'lib/rbt/toplevel_methods/all_binaries.rb', line 46 def self.all_binaries? ALL_BINARIES end |
.all_headers? ⇒ Boolean
#
RBT.all_headers?
#
234 235 236 |
# File 'lib/rbt/registered/registered_headers.rb', line 234 def self.all_headers? RBT::Cookbooks.all_headers? end |
.all_libraries? ⇒ Boolean
#
RBT.all_libraries?
Get back all registered libraries.
This is guaranteed to return a Hash.
#
52 53 54 |
# File 'lib/rbt/toplevel_methods/all_libraries.rb', line 52 def self.all_libraries? ALL_LIBRARIES end |
.all_tags? ⇒ Boolean
#
RBT.all_tags?
#
47 48 49 |
# File 'lib/rbt/registered/registered_tags.rb', line 47 def self. ALL_TAGS end |
.all_urls(optional_commands = nil) ⇒ Object
#
RBT.all_urls
This is simply a convenience method.
#
249 250 251 |
# File 'lib/rbt/cookbooks/all_urls.rb', line 249 def self.all_urls(optional_commands = nil) RBT::Cookbooks::AllUrls.new(optional_commands) end |
.append_error_message(i) ⇒ Object
#
RBT.append_error_message
#
35 36 37 |
# File 'lib/rbt/toplevel_methods/error_message.rb', line 35 def self.(i) @error_message << i end |
.append_what_into(what, into) ⇒ Object
#
RBT.append_what_into
#
95 96 97 |
# File 'lib/rbt/toplevel_methods/save_file.rb', line 95 def self.append_what_into(what, into) RBT::SaveFile.append_what_into(what, into) end |
.are_we_on_gobolinux? ⇒ Boolean
#
RBT.are_we_on_gobolinux?
This method can help us when we wish to determine whether we are on GoboLinux or whether we are not.
Note that this will return a “static” result. If you need a value that is dynamic, you ought to query an instance variable instead.
#
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/rbt/toplevel_methods/gobolinux.rb', line 37 def self.are_we_on_gobolinux? return_this = false use_this_env_key = 'IS_ON_GOBOLINUX' if ENV.has_key? use_this_env_key if ENV[use_this_env_key].to_s == '1' return_this = true end elsif File.exist? FILE_IS_ON_GOBOLINUX return_this = true elsif GOBOLINUX_LAYOUT.to_s == '1' # The constant GOBOLINUX_LAYOUT is a String. return_this = true elsif File.exist?(RBT.file_is_on_gobolinux) and (File.read(RBT.file_is_on_gobolinux).strip.to_s == '1') return_this = true elsif is_this_a_real_gobolinux_system? return_this = true end return return_this end |
.array_all_rubygems ⇒ Object
#
RBT.array_all_rubygems
This method will return all rubygems, as an Array.
This can then be used in other programs, such as in RBT to batch-install all rubygems.
#
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/rbt/toplevel_methods/array_all_rubygems.rb', line 18 def self.array_all_rubygems # ======================================================================= # # This is a bit hack-ish, but it is also fast. We will scan for entries # that hold the content 'url1:'; and also the substring '.gem' within # that entry. Other entries will be ignored. # ======================================================================= # array = [] # ======================================================================= # # Obtain all .yml files first: # ======================================================================= # all_yaml_files = Dir["#{RBT.individual_cookbooks_directory?}*.yml"] all_yaml_files.each {|path_to_the_yaml_file| name_of_the_program = File.basename(path_to_the_yaml_file.sub(/\.yml$/,'')) dataset_of_the_program = File.read(path_to_the_yaml_file) if dataset_of_the_program =~ /^ url1: .*\.gem$/ # =================================================================== # # In this case we will assume that it is a ruby .gem file, so we # add it into the Array that will be returned. # =================================================================== # array << name_of_the_program end } array.sort # Keep it sorted, for easier reading. end |
.array_binary_duplicates(from_this_directory = :default, to = :default) ⇒ Object
#
RBT.array_binary_duplicates
This method will return an Array of all “/usr/bin/” binary duplicates, or from wherever else you wish to get the listing of duplicates. The default target is “/usr/bin/” but you could also pass in the argument “/usr/bin/”, as second argument to this method.
The first argument to this method is the directory where your main binaries should reside at. On GoboLinux-like systems, this will default to '/System/Index/bin'.
Invocation example for this method from within ruby code:
array = RBT.array_binary_duplicates
#
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/rbt/toplevel_methods/check_for_binary_duplicates.rb', line 30 def self.array_binary_duplicates( from_this_directory = :default, to = :default ) # ======================================================================= # # The following two case-menus will handle the :default arguments # passed. The default is, on my home system, for '/System/Index/bin/' # as the first argument, and for '/usr/bin/' as the second argument # to this method here. # ======================================================================= # case from_this_directory when :default from_this_directory = SYSBIN_DIRECTORY end case to when :default to = '/usr/bin/' end array = [] Dir["#{from_this_directory}*"].each {|this_file| # Return the Array here. name_of_the_program = File.basename(this_file) target_file = "#{to}#{name_of_the_program}" if File.exist? target_file array << target_file end } return array end |
.array_these_ruby_gems_were_updated? ⇒ Boolean
#
RBT.array_these_ruby_gems_were_updated?
#
21 22 23 |
# File 'lib/rbt/toplevel_methods/update_all_ruby_gems.rb', line 21 def self.array_these_ruby_gems_were_updated? @array_these_ruby_gems_were_updated end |
.audio_directory? ⇒ Boolean
#
RBT.audio_directory?
Where to keep audio/sound files. (Not a very important constant; it is mostly for my own home system really.)
#
26 27 28 |
# File 'lib/rbt/configuration/configuration.rb', line 26 def self.audio_directory? @configuration.audio_dir end |
.author_name? ⇒ Boolean
#
RBT.author_name?
#
10 11 12 |
# File 'lib/rbt/toplevel_methods/author_name.rb', line 10 def self. 'Robert A. Heiler' end |
.automatically_create_package? ⇒ Boolean
#
RBT.automatically_create_package?
Whether or not to create a package automatically.
#
82 83 84 |
# File 'lib/rbt/configuration/configuration.rb', line 82 def self.automatically_create_package? @configuration.automatically_create_package end |
.autoswitch_python? ⇒ Boolean
#
RBT.autoswitch_python?
Whether to autoswitch python or whether to not autoswitch python.
If set to true then RBT will attempt to switch to another python version, if it is available. It will try to do so only once, though.
#
174 175 176 |
# File 'lib/rbt/configuration/configuration.rb', line 174 def self.autoswitch_python? RBT.configuration?.autoswitch_python end |
.available_programs?(extra_arguments = nil) ⇒ Boolean
#
RBT.available_programs?
This method will return an Array of all available (registered or otherwise made known) programs.
By default it will return a list of programs from the given .yml files.
The optional argument allows us to also use abbreviations, if the argument is the Symbol called :include_abbreviations, :include_aliases or :with_aliases. (These symbols are aliases and do the same.)
The reason why this is not enabled by default is primarily because many other files are only interested in the directly registered programs.
The aliases will at first appear in a Hash, with key->value pairs such as:
"gnomewe"=>"gnomeweather"
Obviously we are here only interested in the keys, which is why the code below will use the method .keys().
Keep in mind that whenever you wish to compile one such program, you need to check to which the program may point at.
#
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
# File 'lib/rbt/toplevel_methods/available_programs.rb', line 60 def self.available_programs?( extra_arguments = nil ) array = determine_available_programs case extra_arguments when :include_abbreviations, :include_aliases, :with_aliases, :with_abbreviations keys = @hash_aliases_to_the_available_programs.keys array << keys else if extra_arguments.is_a? Symbol e "Warning - not registered Symbol called :#{extra_arguments.to_s}" end end # ======================================================================= # # The resulting Array that will be returned from this method will # always be sorted and contain only unique entries: # ======================================================================= # array = array.flatten.uniq.sort array # Return the Array finally. end |
.batch_compile(i = ARGV, try_to_use_chained_programs = true) ⇒ Object
#
RBT.batch_compile
This method can be used to batch compile programs.
The second argument to this method controls as to whether we will make use of chained programs or not.
#
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/rbt/toplevel_methods/batch_compile.rb', line 19 def self.batch_compile( i = ARGV, try_to_use_chained_programs = true ) i = [i].flatten.compact compile_object = RBT::Compile.new { :do_not_run_yet } i.each {|compile_this_program| if compile_this_program.is_a?(String) and compile_this_program.include?(',') compile_this_program = compile_this_program.split(',').map(&:strip) end # ===================================================================== # # Obtain the Array next that will hold our chained programs. # ===================================================================== # if RBT.chained_programs?.include? compile_this_program and try_to_use_chained_programs compile_this_program = RBT.chained_programs?[compile_this_program] end compile_object.set_compile_these_programs(i) compile_object.run compile_object.reset } end |
.blfs(i = 'curl') ⇒ Object
296 297 298 |
# File 'lib/rbt/utility_scripts/blfs.rb', line 296 def self.blfs(i = 'curl') RBT::Blfs.new(i.to_sym) { :no_colours_be_quiet }.result? end |
.build_type? ⇒ Boolean
264 265 266 |
# File 'lib/rbt/utility_scripts/build_detector.rb', line 264 def self.build_type? RBT::BuildDetector.build_type? end |
.chained_programs?(i = RBT.file_cookbook_chained_programs) ⇒ Boolean
#
RBT.chained_programs?
Simply return the dataset from the yaml file here.
The file that is used here is the file chained_programs.yml, which you can access via:
bl $RSRC/rbt/lib/rbt/yaml/chained_programs.yml
#
47 48 49 50 51 |
# File 'lib/rbt/constants/chained_programs.rb', line 47 def self.chained_programs?( i = RBT.file_cookbook_chained_programs ) YAML.load_file(i) end |
.change_directory(i) ⇒ Object
#
RBT.change_directory
#
12 13 14 |
# File 'lib/rbt/toplevel_methods/change_directory.rb', line 12 def self.change_directory(i) Dir.chdir(i) end |
.check_and_report_whether_file_exists(i, optional_cookbook_object = nil) ⇒ Object
#
RBT.check_and_report_whether_file_exists
The first argument to this method must be the path to the archive.
#
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/rbt/toplevel_methods/report_extended_information_about_this_program.rb', line 18 def self.check_and_report_whether_file_exists( i, optional_cookbook_object = nil ) i = i.to_s unless File.exist? i opnn; Colours.ewarn 'This archive does not exist locally, at' opnn; Colours.ewarn " `#{Colours.sfile(i)}#{swarn('`')}" if optional_cookbook_object if optional_cookbook_object.do_not_download? opnn; e 'This is, however had, no problem as it will not' opnn; e 'be downloaded anyway.' end end cliner :lightblue end end |
.check_for_binary_duplicates ⇒ Object
#
RBT.check_for_binary_duplicates
This method will check for binary duplicates in the directory /usr/bin/.
#
65 66 67 68 69 70 71 72 |
# File 'lib/rbt/toplevel_methods/check_for_binary_duplicates.rb', line 65 def self.check_for_binary_duplicates array_binary_duplicates.each {|target_file| surrounded_target_file = "`#{target_file}`" colourized_target_file = sfile(surrounded_target_file) padded_and_colourized_target_file = colourized_target_file.ljust(70) e "Yes, #{padded_and_colourized_target_file} is a duplicate." } end |
.check_for_invalid_entries_in_this_cookbook(i = ARGV) ⇒ Object
#
RBT.check_for_invalid_entries_in_this_cookbook
This method will also check for invalid entries in the given cookbook .yml file.
#
343 344 345 |
# File 'lib/rbt/validation/check_for_invalid_entries_in_this_cookbook.rb', line 343 def self.check_for_invalid_entries_in_this_cookbook(i = ARGV) ::RBT::Cookbooks::CheckForInvalidEntriesInThisCookbook.new(i) end |
.check_if_source_directories_exist ⇒ Object
#
RBT.check_if_source_directories_exist
#
189 190 191 |
# File 'lib/rbt/cookbooks/check_for_existing_source_directories.rb', line 189 def self.check_if_source_directories_exist RBT::Cookbooks::CheckIfSourceDirectoriesExist.new end |
.check_this_cookbook_file_for_errors(this_file = "#{RUBY_SRC_RBT_COOKBOOKS}jasper.yml") ⇒ Object
#
RBT.check_this_cookbook_file_for_errors
The first file should be an existing .yml file holding the dataset that may be faulty.
#
59 60 61 62 63 64 65 66 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 92 93 94 |
# File 'lib/rbt/toplevel_methods/check_this_cookbook_file_for_errors.rb', line 59 def self.check_this_cookbook_file_for_errors( this_file = "#{RUBY_SRC_RBT_COOKBOOKS}jasper.yml" ) if this_file.is_a? Array this_file = this_file.first end if this_file.nil? this_file = "#{RUBY_SRC_RBT_COOKBOOKS}jasper.yml" end if File.exist? this_file registered_cookbook_entries = RBT.registered_cookbook_entries? dataset = YAML.load_file(this_file) key = dataset.keys.first available_entries_from_the_cookbooks_file = dataset[key].keys # ===================================================================== # # Next, obtain the entries that were not registered. Keep in mind # that this Array may be entry. # ===================================================================== # these_entries_were_not_registered = available_entries_from_the_cookbooks_file.reject {|entry| registered_cookbook_entries.include? entry } unless these_entries_were_not_registered.empty? opn; e 'The file at `'+sfile(this_file)+'`' opn; e 'contains at the least one erroneous entry.' these_entries_were_not_registered.each {|this_entry_is_not_included| opn; e 'The entry `'+sfancy(this_entry_is_not_included)+'` is not registered.' } else opn; e 'Everything is fine for '+sfile(this_file)+'.' opn; e 'It has '+RBT.violet('no incorrect entries')+'.' end else opn; e 'No file exists at '+this_file+'.' end end |
.check_whether_this_yaml_file_has_two_url1_entries(i = ARGV) ⇒ Object
#
RBT.check_whether_this_yaml_file_has_two_url1_entries
The argument to this method should be the local file path, e. g. “foobar.yml”, as a String. Make sure that the file exists before calling this method here.
Usage example:
RBT.check_whether_this_yaml_file_has_two_url1_entries('xcbutilerrors.yml')
#
359 360 361 362 |
# File 'lib/rbt/validation/check_for_invalid_entries_in_this_cookbook.rb', line 359 def self.check_whether_this_yaml_file_has_two_url1_entries(i = ARGV) _ = ::RBT::Cookbooks::CheckForInvalidEntriesInThisCookbook.new(i) { :do_not_run_yet } return _.check_whether_this_yaml_file_has_two_url1_entries(:default, i) end |
.chmod(this_file, permission = 0755) ⇒ Object
#
RBT.chmod (chmod tag)
Use this method to chmod a file or a directory. It also works with several files/directories passed in as Array.
#
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/rbt/toplevel_methods/chmod.rb', line 15 def self.chmod( this_file, = 0755 ) if this_file.is_a? Array this_file.each { |file| chmod(file, ) } else File.chmod(.to_i, this_file) end end |
.chroot_compile(this_program = ARGV, use_this_as_prefix = '/Depot/Chroot/') ⇒ Object
#
RBT.chroot_compile
This method can be used to chroot-compile a given program, that is, to compile it INTO the chroot.
This is mostly a “hackish” method in that I needed it to quickly compile programs into my main chroot, for when I build it up.
#
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/rbt/toplevel_methods/chroot_compile.rb', line 21 def self.chroot_compile( this_program = ARGV, use_this_as_prefix = '/Depot/Chroot/' ) if this_program.is_a? Array this_program.map! {|entry| if entry =~ /^\d+$/ # If it is a number. dataset = YAML.load_file(RBT.file_installation_procedere)['default'] entry = dataset[entry.to_i - 1] end entry } end RBT::Compile.new(this_program) {{ use_this_as_prefix: use_this_as_prefix }} end |
.cliner(use_this_token = '=', use_this_colour = nil, &block) ⇒ Object
#
RBT.cliner
This method accepts block-parameters such as :unicode, which will be “converted” into a corresponding horizontal line via a certain unicode block-symbol.
#
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 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 92 93 94 95 96 97 98 99 100 |
# File 'lib/rbt/toplevel_methods/cliner.rb', line 34 def self.cliner( use_this_token = '=', use_this_colour = nil, &block ) case use_this_token when :do_not_use_colours use_this_token = '=' use_this_colour = nil when :default use_this_token = '=' end case use_this_colour when :default use_this_colour = nil end if block_given? yielded = yield case yielded when :unicode_middle_horizontal_bar begin # ================================================================= # # Fetch the unicode block here. # ================================================================= # require 'roebe/requires/require_unicode.rb' use_this_token = ::Roebe. rescue LoadError end when :unicode begin # ================================================================= # # Fetch the unicode block here. # ================================================================= # require 'roebe/requires/require_unicode.rb' use_this_token = ::Roebe.return_horizontal_unicode_block rescue LoadError end end end use_this_colour = nil if use_this_token.is_a? Hash if use_this_token.has_key? :use_colour use_this_colour = use_this_token[:use_colour] use_this_token = '=' # Restore the default in this case. end end case use_this_token when nil, :default use_this_token = '=' # <- Restore to the default in this case. end if use_this_colour if use_this_colour.to_s.start_with?('konsole_dodgerblue') and !use_this_colour.to_s.include?('colour_') # ================================================================= # # In this case, rewrite the colour-code a little, such as from # 'konsole_dodgerblue' towards 'konsole_colour_blue'. # ================================================================= # use_this_colour = 'konsole_colour_'+use_this_colour.to_s.split('_').last end puts ::Colours::AllColourMethods.send(use_this_colour, (use_this_token * 80)) else if use_this_token.is_a? Symbol use_this_token = ::Colours::AllColourMethods.send(use_this_token, '=') end puts (use_this_token * 80) end end |
.colour_make(&block) ⇒ Object
#
RBT.colour_make
#
573 574 575 |
# File 'lib/rbt/make/make.rb', line 573 def self.colour_make(&block) RBT::Make.new(&block).run end |
.colour_make_install(&block) ⇒ Object
#
RBT.colour_make_install
#
86 87 88 |
# File 'lib/rbt/make/colour_make_install.rb', line 86 def self.colour_make_install(&block) RBT::ColourMakeInstall.new(&block) end |
.commandline_options? ⇒ Boolean
#
RBT.commandline_options?
#
21 22 23 |
# File 'lib/rbt/commandline/commandline_menu.rb', line 21 def self. @commandline_options end |
.compile_strategies? ⇒ Boolean
#
RBT.compile_strategies?
#
272 273 274 |
# File 'lib/rbt/statistics/compile_strategies.rb', line 272 def self.compile_strategies? RBT::CompileStrategies.new end |
.compile_these_programs? ⇒ Boolean
#
RBT.compile_these_programs?
#
108 109 110 |
# File 'lib/rbt/toplevel_methods/compile_these_programs.rb', line 108 def self.compile_these_programs? @compile_these_programs end |
.compile_via_appdir_prefix_without_symlinking(i = ARGV) ⇒ Object
#
RBT.compile_via_appdir_prefix_without_symlinking
This method will compile via a versioned AppDir approach, but will not symlink after compilation has finished.
#
17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/rbt/toplevel_methods/compile_via_appdir_prefix_without_symlinking.rb', line 17 def self.compile_via_appdir_prefix_without_symlinking(i = ARGV) i = [i].flatten.compact i.each {|this_program| _ = Compile.new(this_program) {{ run_already: :do_not_run_yet, symlink_after_compilation_has_finished: false }} _.do_use_an_appdir_prefix _.run } end |
.compile_via_environment_variable_as_prefix(compile_these_programs = ARGV, use_this_environment_variable = :default) ⇒ Object
#
RBT.compile_via_environment_variable_as_prefix
#
161 162 163 164 165 166 167 168 |
# File 'lib/rbt/utility_scripts/compile_via_environment_variable_as_prefix.rb', line 161 def self.compile_via_environment_variable_as_prefix( compile_these_programs = ARGV, use_this_environment_variable = :default ) RBT::CompileViaEnvironmentVariableAsPrefix.new( compile_these_programs, use_this_environment_variable ) end |
.configuration? ⇒ Boolean
#
RBT.configuration?
Query method over the configuration-object.
#
33 34 35 |
# File 'lib/rbt/configuration/configuration_instance_variable.rb', line 33 def self.configuration? @configuration end |
.configuration_directory? ⇒ Boolean
#
RBT.configuration_directory?
#
27 28 29 |
# File 'lib/rbt/toplevel_methods/configuration_directory.rb', line 27 def self.configuration_directory? @configuration_directory end |
.configuration_has_been_initialized_already? ⇒ Boolean
#
RBT.configuration_has_been_initialized_already?
#
152 153 154 |
# File 'lib/rbt/configuration/initialize_configuration.rb', line 152 def self.configuration_has_been_initialized_already? !@configuration.nil? end |
.configure_appdir_prefix(i = return_pwd) ⇒ Object
#
RBT.configure_appdir_prefix
This method will return the AppDir prefix, based on the given input, which defaults to the current working directory.
#
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/rbt/toplevel_methods/configure_appdir_prefix.rb', line 23 def self.configure_appdir_prefix( i = return_pwd ) i = i.first if i.is_a? Array if i.nil? or i.empty? i = return_pwd end target = File.basename(i) _ = './configure --prefix='+ programs_dir?+ ProgramInformation.return_name(target).capitalize+'/'+ ProgramInformation.return_version(target)+ '/' e _ end |
.configure_has_a_higher_priority_than_meson? ⇒ Boolean
#
RBT.configure_has_a_higher_priority_than_meson?
This method will return true if “configure” has a higher priority than “meson”. A yaml file keeps track of these priorities, so if you wish to change the priority, you have to modify the content of that .yml file.
The name of that yaml file:
build_systems_priorities.yml
#
27 28 29 30 |
# File 'lib/rbt/toplevel_methods/configure_has_a_higher_priority_than_meson.rb', line 27 def self.configure_has_a_higher_priority_than_meson? array = YAML.load_file(FILE_BUILD_SYSTEMS_PRIORITIES) array.index('configure') < array.index('meson') end |
.convert_global_env(i) ⇒ Object
#
RBT.convert_global_env
#
12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/rbt/toplevel_methods/convert_global_env.rb', line 12 def self.convert_global_env(i) unless Object.const_defined? :ConvertGlobalEnv begin require 'convert_global_env' rescue LoadError; end end i = i.first if i.is_a? Array if Object.const_defined? :ConvertGlobalEnv and i.include?('$') # Assume an ENV variable here. i = ConvertGlobalEnv.convert(i.dup).dup end return i end |
.cookbook(i) ⇒ Object
#
RBT.cookbook
Easier toplevel method to create a new cookbook-instance. Use with care, though.
#
883 884 885 |
# File 'lib/rbt/cookbooks/cookbook/misc.rb', line 883 def self.cookbook(i) RBT::Cookbooks::Cookbook.new(i) end |
.cookbook_aliases ⇒ Object
#
RBT.cookbook_aliases
This will return the registered/available keys, in a sorted manner.
This will have about 331 entries (as of August 2018).
#
42 43 44 |
# File 'lib/rbt/aliases/cookbook_aliases.rb', line 42 def self.cookbook_aliases COOKBOOK_ALIASES.keys.sort end |
.cookbook_aliases? ⇒ Boolean
#
RBT.cookbook_aliases?
#
31 32 33 |
# File 'lib/rbt/aliases/cookbook_aliases.rb', line 31 def self.cookbook_aliases? COOKBOOK_ALIASES end |
.cookbook_directory? ⇒ Boolean
#
RBT.cookbook_directory?
Provide a pointer, through this query method, towards the directory where the individual cookbooks are kept.
#
61 62 63 |
# File 'lib/rbt/toplevel_methods/cookbook_directory.rb', line 61 def self.cookbook_directory? @cookbook_directory end |
.copy_recursively(what, where_to = '/usr/', be_verbose = false) ⇒ Object
#
RBT.copy_recursively
We can use a call to system(), or the pure ruby version, in order to recursively copy files. But you may not enough information if the pure ruby version is used.
#
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/rbt/toplevel_methods/copy_recursively.rb', line 18 def self.copy_recursively( what, where_to = '/usr/', be_verbose = false ) if what.is_a? String what << '.' unless what.end_with? '.' end begin FileUtils.cp_r( what, where_to, verbose: be_verbose ) rescue Exception => error pp error end end |
.create_appdir_skeleton(use_this_path = :default, &block) ⇒ Object
#
RBT.create_appdir_skeleton
#
399 400 401 402 403 |
# File 'lib/rbt/create_app_dir_skeleton/misc.rb', line 399 def self.create_appdir_skeleton( use_this_path = :default, &block ) RBT::CreateAppDirSkeleton[use_this_path, &block] end |
.create_cookbook_yaml_file(i = 'php') ⇒ Object
#
RBT.create_cookbook_yaml_file
#
48 49 50 |
# File 'lib/rbt/cookbooks/create_cookbook_yaml_file/initialize.rb', line 48 def self.create_cookbook_yaml_file(i = 'php') RBT::Cookbooks::CreateCookbookYamlFile.new(i) end |
.create_directory(where = '/Depot/Packages/', use_this_mode = 0755, be_verbose = :be_quiet, do_use_opnn = true) ⇒ Object
#
RBT.create_directory
Internal Wrapper to create a directory.
We will also check if a Dir exists before actually creating it. This is the method of choice for creating a directory. Use it for all the RBT scripts, whenever you need to create a directory.
#
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 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 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
# File 'lib/rbt/toplevel_methods/create_directory.rb', line 23 def self.create_directory( where = '/Depot/Packages/', use_this_mode = 0755, be_verbose = :be_quiet, do_use_opnn = true ) case use_this_mode when :be_verbose be_verbose = :be_verbose use_this_mode = :default end if where.is_a? Array where.each {|entry| create_directory( entry, use_this_mode, be_verbose, do_use_opnn ) } else if File.directory? where unless where.end_with? '/' # Append a /. where = where.dup if where.frozen? where << '/' end end case use_this_mode when :default # Default value is 0755. use_this_mode = 0755 when Hash if use_this_mode.has_key? :verbosity use_this_mode = use_this_mode.delete(:verbosity) end use_this_mode = 0755 when '', true use_this_mode = 0755 when :be_verbose use_this_mode = 0755 be_verbose = true end # ===================================================================== # # Handle special symbols given to be_verbose. # ===================================================================== # case be_verbose when Hash # =================================================================== # # === :verbosity # =================================================================== # if be_verbose.has_key? :verbosity be_verbose = be_verbose.delete(:verbosity) end # ===================================================================== # # === :be_quiet # ===================================================================== # when :be_quiet, :be_silent be_verbose = false end case do_use_opnn when :do_not_use_opn, :do_not_use_opnn do_use_opnn = false end if File.exist? where if be_verbose opnn if do_use_opnn e "Directory `#{sdir(where)}` already exists, thus" opnn if do_use_opnn e 'skipping creating a new one.' end else if where if be_verbose opnn if do_use_opnn e "Creating the directory `#{sdir(where)}` next." end unless File.directory? where = { mode: use_this_mode, verbose: false } # =============================================================== # # The variable where can be a String such as # "/home/Programs/Tepl/Current/yaml/". We have # to keep in mind that the mkdir-part may fail, # so a rescue clause has to be used. # =============================================================== # begin FileUtils.mkdir_p(where, **) rescue Errno::EEXIST e "The directory `#{sdir(where)}` can not be created" e 'as some target, or an incorrect symlink, '\ 'already exists.' end # if be_verbose # opnn if do_use_opnn # e "Can not write into the directory `#{sdir(where)}` "\ # "due to insufficient permissions." # end end else opnn if do_use_opnn; e 'No directory was given.' end end end end |
.create_gobolinux_recipe(i = 'htop') ⇒ Object
#
RBT.create_gobolinux_recipe
Easier module-method instantiation.
#
460 461 462 463 464 465 466 |
# File 'lib/rbt/linux/gobolinux/create_recipe.rb', line 460 def self.create_gobolinux_recipe(i = 'htop') yielded = nil if block_given? yielded = yield end RBT::Linux::Gobolinux::CreateRecipe.new(i) { yielded } end |
.create_html_page_for_these_programs(array = ARGV) ⇒ Object
#
RBT.create_html_page_for_these_programs
This method works on an Array as its input. This Array should be about programs that you want to see an auto-generated webpage containing some information about this program.
#
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 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 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 |
# File 'lib/rbt/toplevel_methods/create_html_page_for_these_programs.rb', line 27 def self.create_html_page_for_these_programs(array = ARGV) if array.is_a?(String) and array.start_with?(':') array = array.to_s.delete(':').to_sym end if array.is_a? Symbol require 'rbt/utility_scripts/search_for_tags/search_for_tags.rb' # ===================================================================== # # Handle special cases such as KDE5. # ===================================================================== # case array # case tag # ===================================================================== # # === cookbooks --create_html_page_for_these_programs=:kde5 # ===================================================================== # when :kde, :kde5 array = RBT.return_all_programs_that_match_this_tag(:kde5) # ===================================================================== # # === cookbooks --create_html_page_for_these_programs=:kde5_toolchain # ===================================================================== # when :kde5_toolchain # =================================================================== # # This variant here should be equivalent to LFS/BLFS, in the proper # order. This thus requires a yaml file. # =================================================================== # dataset = load_yaml(RBT.file_cookbook_chained_programs) array = dataset['kde5_foundation']+ dataset['kde5_plasma']+ dataset['kde5_applications']+ dataset['kde5_porting_aids'] if array.is_a? String # Well ... :) array.delete!(' ') array = array.split(',') end end end if array.is_a? Array if array.first.is_a?(String) and array.first.include?(',') # <- Input such as ["php,kio,ruby"] array = array.first.split(',') end array.flatten! if array.size > 20 opn; e 'More than 20 entries were given (exactly '+ sfancy(array.size.to_s)+'). This may take a while.' end @html_page_content = "<html>".dup begin require 'web_object' @html_page_content << WebObject. rescue LoadError; end @html_page_content << "<head><title>HTML Pages for programs</title>"\ "<style>pre { font-size: 1.4em; }</style>"\ "</head><body><hr>\n".dup # Reset again. array.each_with_index {|this_program, index| index += 1 # =================================================================== # # For each program, we do the same actions: # # (1) Obtain the dataset via Cookbooks::Cookbook.new() OR # from the expanded directory containing all yaml files. # (2) # =================================================================== # if File.directory?(RBT.) and File.exist?(target_file = "#{RBT.}#{this_program}.yml") dataset = load_yaml(target_file) remote_url = dataset['url1'] description = dataset['raw_description'] licence = dataset['licence'] homepage = dataset['homepage'].to_s binaries = dataset['binaries'] libraries = dataset['libraries'] else dataset = RBT::Cookbooks::Cookbook.new(this_program) remote_url = dataset.url1? description = dataset.raw_description? licence = dataset.licence? homepage = dataset.homepage? binaries = dataset.binaries? libraries = dataset.binaries? end if licence.is_a? Array licence = licence.join(', ') end @html_page_content << "<p>\n<h3 style=\"color:darkgreen\"><b style=\"color:darkblue\">"\ "#{index})</b> #{this_program}</h3><br>\n" @html_page_content << " <span style=\"margin-left: 1em; font-weight:bold; color: darkblue\">wget #{remote_url}<span><br><br>\n" unless description.to_s.empty? # <- Ignore empty descriptions. @html_page_content << "<pre>#{description}</pre>\n" end # =================================================================== # # Add the binaries next: # =================================================================== # if binaries and binaries.is_a?(Array) and !binaries.empty? @html_page_content << "Binaries:<br><br>\n" binaries.each {|this_binary| @html_page_content << "<span style=\"margin-left:2em\">→ #{this_binary}<span><br>\n" } @html_page_content << "<br>\n" end # =================================================================== # # Add the libraries next: # =================================================================== # if libraries and libraries.is_a?(Array) and !libraries.empty? @html_page_content << "Libraries:<br><br>\n" libraries.each {|this_binary| @html_page_content << "<span style=\"margin-left:2em\">→ #{this_binary}<span><br>\n" } @html_page_content << "<br>\n" end @html_page_content << "licence: #{licence}<br><br>\n" @html_page_content << "homepage: <a href=\"#{homepage}\">#{homepage}</a><br>\n" @html_page_content << "</p><br><hr>\n" } # ===================================================================== # # Next, store that HTML page somewhere. # ===================================================================== # what = @html_page_content into = "#{log_dir?}programs.html" opn; e "Storing these #{sfancy(array.size)} programs into the file:" e e " #{sfile(into)}" e write_what_into(what, into) @html_page_content = ''.dup # Clear it again here. else opn; e 'This method requires an Array as input.' end end |
.create_log_directory ⇒ Object
#
RBT.create_log_directory
This method will create the log directory, e. g. “/tmp/rbt/” or wherever else the user has set this directory to be at.
#
20 21 22 23 24 25 26 27 28 |
# File 'lib/rbt/toplevel_methods/create_log_directory.rb', line 20 def self.create_log_directory _ = @log_directory unless File.directory? _ opn; e "Creating the directory `#{sdir(_)}` now." FileUtils.mkdir_p(_) else opn; e "The directory at `#{sdir(_)}` already exists." end end |
.create_program_version_url_file(also_show_last_update = :default) ⇒ Object
#
RBT.create_program_version_url_file
The boolean argument that can be passed to this method determines as to whether we will also show the time when the program has been last updated. By default this is true, meaning that we WILL show when a program has been last updated.
To invoke this method from the commandline, do:
rbt --create_program_version_url_file
#
175 176 177 178 179 180 181 182 183 184 185 |
# File 'lib/rbt/information/create_program_version_url_file.rb', line 175 def self.create_program_version_url_file( also_show_last_update = :default # Since Feb 2018, we will show the last update by default. ) case also_show_last_update # case tag when :also_show_last_update, :include_last_update, :default also_show_last_update = true end RBT::CreateProgramVersionUrlFile.new {{ show_last_update: also_show_last_update }} end |
.create_programs_version_html_file(use_this_file = "#{RBT.store_into_this_directory}programs_version.txt") ⇒ Object
#
RBT.create_programs_version_html_file
Commandline invocation example:
rbt --create_programs_version_html_file
The default input file can be found at:
/Depot/Temp/rbt/CookbookDirectory/programs_version_url.txt
#
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/rbt/toplevel_methods/create_programs_version_html_file.rb', line 29 def self.create_programs_version_html_file( use_this_file = "#{RBT.store_into_this_directory}programs_version.txt" ) updated_when = "#{RBT.return_date} #{RBT.return_time}" # ======================================================================= # # Generate a .html file. # ======================================================================= # dataset = '<html><title>Programs of Cookbooks Version: '+RBT.version?+ ' Last updated: '+updated_when+ '</title><body> Last update: <b>'+updated_when+'</b><br> <pre style="font-size:1.2em">'+ File.read(use_this_file)+'</pre></body></html>' # ======================================================================= # # Store that file next: # ======================================================================= # use_this_file = RBT.temp_directory?+'programs_version.html' opn; e "Generating a new file at `#{::Colours.sfile(use_this_file)}`." RBT.write_what_into( dataset, use_this_file ) # Store it here. end |
.create_registered_tags ⇒ Object
#
RBT.create_registered_tags
#
252 253 254 |
# File 'lib/rbt/registered/registered_tags.rb', line 252 def self. RegisteredTags.new end |
.create_shell_script_containing_these_program_versions ⇒ Object
#
RBT.create_shell_script_containing_these_program_versions
#
211 212 213 |
# File 'lib/rbt/utility_scripts/create_shell_script_containing_these_program_versions.rb', line 211 def self.create_shell_script_containing_these_program_versions RBT::CreateShellScriptContainingTheseProgramsVersions.new end |
.create_snapcraft_file(i) ⇒ Object
#
RBT.create_snapcraft_file
Simpler toplevel module-method for creating a snapcraft file.
#
443 444 445 |
# File 'lib/rbt/cookbooks/create_snapcraft_file.rb', line 443 def self.create_snapcraft_file(i) RBT::Cookbooks::CreateSnapcraftFile.new(i) end |
.crimson(i) ⇒ Object
#
RBT.crimson
#
36 37 38 39 |
# File 'lib/rbt/colours/html_colours.rb', line 36 def self.crimson(i) return COLOURS.crimson(i) if use_colours? i end |
.debug? ⇒ Boolean
#
RBT.debug?
Easier query-method as to whether we will debug or whether we will not.
#
29 30 31 |
# File 'lib/rbt/toplevel_methods/debug.rb', line 29 def self.debug? SHALL_WE_DEBUG end |
.depends_on_cmake?(i = nil) ⇒ Boolean
#
RBT.depends_on_cmake?
This method will only query the original cookbook-dataset, whether the project at hand depends on cmake or whether it does not.
#
84 85 86 |
# File 'lib/rbt/toplevel_methods/does_this_file_exist.rb', line 84 def self.depends_on_cmake?(i = nil) i and i.include? 'cmake' end |
.depends_on_ninja?(i = nil) ⇒ Boolean
#
RBT.depends_on_ninja?
#
100 101 102 |
# File 'lib/rbt/toplevel_methods/does_this_file_exist.rb', line 100 def self.depends_on_ninja?(i = nil) i and i.include?('ninja') end |
.depends_on_python?(i = nil) ⇒ Boolean
#
RBT.depends_on_python?
Whether python is registered as a dependency.
#
93 94 95 |
# File 'lib/rbt/toplevel_methods/does_this_file_exist.rb', line 93 def self.depends_on_python?(i = nil) i and i.include? 'python' end |
.depends_on_waf?(i = nil) ⇒ Boolean
#
RBT.depends_on_waf?
#
107 108 109 |
# File 'lib/rbt/toplevel_methods/does_this_file_exist.rb', line 107 def self.depends_on_waf?(i = nil) i and i.include? 'waf' end |
.depot_directory? ⇒ Boolean
#
RBT.depot_directory?
#
43 44 45 |
# File 'lib/rbt/toplevel_methods/depot_directory.rb', line 43 def self.depot_directory? @depot_directory end |
.determine_appdir_prefix_from_this_input(name_of_the_program = 'htop', version_of_the_program = nil) ⇒ Object
#
RBT.determine_appdir_prefix_from_this_input
This method will return a String such as “/Programs/Htop/1.1.1/” or “/home/Programs/Htop/1.1.1/”.
#
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/rbt/toplevel_methods/determine_appdir_prefix_from_this_input.rb', line 24 def self.determine_appdir_prefix_from_this_input( name_of_the_program = 'htop', version_of_the_program = nil ) if name_of_the_program.is_a? Array name_of_the_program = name_of_the_program.first end name_of_the_program = 'htop' if name_of_the_program.nil? new_prefix = ''.dup # ======================================================================= # # Append the "/Programs/" string next: # ======================================================================= # new_prefix << programs_directory? if name_of_the_program.nil? e 'Please supply a valid argument to this method.' e e 'A valid input-argument may be:' e e ' foobar-1.0' e raise 'A program-name (String) is required.' end # ======================================================================= # # === Safeguard against improper versions # ======================================================================= # if version_of_the_program.nil? and name_of_the_program.include?('-') version_of_the_program = ProgramInformation.return_version(name_of_the_program) name_of_the_program = ProgramInformation.return_name(name_of_the_program) end new_prefix << name_of_the_program.capitalize new_prefix << '/' if version_of_the_program new_prefix << "#{version_of_the_program}/" end return new_prefix end |
.determine_available_programs ⇒ Object
#
RBT.determine_available_programs
This method will determine how many .yml files exist in the cookbook directory at hand.
Always keep the result (alphabetically) sorted.
#
26 27 28 29 30 |
# File 'lib/rbt/toplevel_methods/available_programs.rb', line 26 def self.determine_available_programs Dir["#{RBT.cookbook_directory?}*.yml"].map {|entry| File.basename(entry.sub(/\.yml$/,'')) }.sort end |
.determine_host_architecture ⇒ Object
#
RBT.determine_host_architecture
If you ever want to determine the host architecture, make use of this method here. This method will return a String, containing the host computer's architecture. (x86_64 essentially means 64 bit binaries)
Invocation example:
RBT.determine_host_architecture # => "x86_64"
#
23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/rbt/toplevel_methods/determine_host_architecture.rb', line 23 def self.determine_host_architecture # ======================================================================= # # We use uname to query the host architecture. This will thus # not work on Windows. An alternative would be to use: # RbConfig::CONFIG['host'] # This is now what we will use. # ======================================================================= # # this_architecture = `uname -m`.to_s.chomp this_architecture = RbConfig::CONFIG['host'] if this_architecture.include? '-' this_architecture = this_architecture.split('-').first end return this_architecture end |
.directory_expanded_cookbooks? ⇒ Boolean
#
RBT.directory_expanded_cookbooks?
On my home system, this method will return the following String:
"/home/Temp/rbt/expanded_cookbooks/"
#
251 252 253 |
# File 'lib/rbt/constants/file_and_directory_constants.rb', line 251 def self. "#{RBT.rbt_log_directory?}expanded_cookbooks/" end |
.disable_colours ⇒ Object
#
RBT.disable_colours
This method can be used to disable the use of colours for the whole RBT project.
#
41 42 43 |
# File 'lib/rbt/colours/use_colours.rb', line 41 def self.disable_colours @use_colours = false end |
.disable_md5sum_calculation ⇒ Object
#
RBT.disable_md5sum_calculation
Use this method to disable the md5sum calculation altogether.
#
43 44 45 |
# File 'lib/rbt/toplevel_methods/md5sum.rb', line 43 def self.disable_md5sum_calculation @display_md5sum = false end |
.disable_opn ⇒ Object
#
RBT.disable_opn
#
34 35 36 |
# File 'lib/rbt/toplevel_methods/opn.rb', line 34 def self.disable_opn @use_opn = false end |
.display_md5sum? ⇒ Boolean
#
RBT.display_md5sum?
Tell us whether we will display the md5sum values or whether we will not.
#
34 35 36 |
# File 'lib/rbt/toplevel_methods/md5sum.rb', line 34 def self.display_md5sum? @display_md5sum end |
.do_compile(this_program) ⇒ Object
#
RBT::do_compile
#
158 159 160 |
# File 'lib/rbt/compile/class_methods.rb', line 158 def self.do_compile(this_program) ::RBT::Compile.compile(this_program, nil) end |
.do_not_register_into_the_yaml_database ⇒ Object
#
RBT.do_not_register_into_the_yaml_database
#
49 50 51 |
# File 'lib/rbt/utility_scripts/register_program_files_into_yaml_database.rb', line 49 def self.do_not_register_into_the_yaml_database @register_program_files_into_yaml_database = false end |
.do_not_show_names ⇒ Object
#
RBT.do_not_show_names
#
35 36 37 |
# File 'lib/rbt/toplevel_methods/show_names.rb', line 35 def self.do_not_show_names @show_names = false end |
.do_not_show_names? ⇒ Boolean
#
RBT.do_not_show_names?
This is the reverse complement to RBT.show_the_classname?.
#
42 43 44 |
# File 'lib/rbt/toplevel_methods/do_show_the_classname.rb', line 42 def self.do_not_show_names? !RBT.show_the_classname? end |
.do_not_show_the_classname ⇒ Object
#
RBT.do_not_show_the_classname
#
24 25 26 |
# File 'lib/rbt/toplevel_methods/do_show_the_classname.rb', line 24 def self.do_not_show_the_classname @do_show_the_classname = false end |
.do_show_the_classname ⇒ Object
#
RBT.do_show_the_classname
#
12 13 14 |
# File 'lib/rbt/toplevel_methods/do_show_the_classname.rb', line 12 def self.do_show_the_classname @do_show_the_classname = true end |
.dodgerblue(i) ⇒ Object
#
RBT.dodgerblue
#
12 13 14 15 |
# File 'lib/rbt/colours/html_colours.rb', line 12 def self.dodgerblue(i) return COLOURS.dodgerblue(i) if use_colours? i end |
.does_include_this_binary?(i, perform_a_deep_check = false) ⇒ Boolean
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/rbt/toplevel_methods/all_binaries.rb', line 69 def self.does_include_this_binary?( i, perform_a_deep_check = false ) all_binaries = all_binaries? # ======================================================================= # # This entry point is for checking input such as "matescreenshot", # which could be "mate-screenshot". Note that as of January 2020 # this is only enabled for binaries - not sure if we need to enable # this for other input-type as well, but binaries make the most # sense. # ======================================================================= # if perform_a_deep_check all_binaries.transform_keys! {|entry| entry.delete('-') } end all_binaries.has_key?(i) end |
.does_include_this_library?(i) ⇒ Boolean
87 88 89 |
# File 'lib/rbt/toplevel_methods/all_libraries.rb', line 87 def self.does_include_this_library?(i) all_libraries?.has_key?(i) end |
.does_this_cookbook_file_have_any_erroneous_entry?(this_file = "#{RUBY_SRC_RBT_COOKBOOKS}jasper.yml") ⇒ Boolean
#
RBT.does_this_cookbook_file_have_any_erroneous_entry?
This method will return a boolen value - true or false.
If true then the cookbook file in question has had an erroneous entry.
#
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/rbt/toplevel_methods/check_this_cookbook_file_for_errors.rb', line 26 def self.does_this_cookbook_file_have_any_erroneous_entry?( this_file = "#{RUBY_SRC_RBT_COOKBOOKS}jasper.yml" ) if this_file.is_a? Array this_file = this_file.first end if this_file.nil? this_file = "#{RUBY_SRC_RBT_COOKBOOKS}jasper.yml" end if File.exist? this_file registered_cookbook_entries = RBT.registered_cookbook_entries? dataset = YAML.load_file(this_file) key = dataset.keys.first available_entries_from_the_cookbooks_file = dataset[key].keys # ===================================================================== # # Next, obtain the entries that were not registered. Keep in mind # that this Array may be entry. # ===================================================================== # these_entries_were_not_registered = available_entries_from_the_cookbooks_file.reject {|entry| registered_cookbook_entries.include? entry } !these_entries_were_not_registered.empty? else false # You have to ensure that the file exists on your own. end end |
.does_this_file_exist?(i = FILE_SCONS, prepend_this_for_the_check = nil) ⇒ Boolean
#
RBT.does_this_file_exist?
This method will check whether a given file exists or whether it does not.
The second argument can be used to determine whether we shall use a file at a particular position on the filesystem, e. g. like '../include/' that can be passed. This would check for the file at the directory below the current one, within the include/ subdirectory.
#
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/rbt/toplevel_methods/does_this_file_exist.rb', line 24 def self.does_this_file_exist?( i = FILE_SCONS, prepend_this_for_the_check = nil ) if i.is_a? Array i = i.first end i = i.to_s unless i.is_a? String # We need a String past this point. if prepend_this_for_the_check unless prepend_this_for_the_check.is_a? String if prepend_this_for_the_check == true # ================================================================= # # true values are converted into '../' strings. # ================================================================= # prepend_this_for_the_check = '../'.dup end end i = i.dup.prepend( prepend_this_for_the_check.dup ) end File.exist? i end |
.does_this_file_exist_and_is_it_a_file?(i) ⇒ Boolean
#
RBT.does_this_file_exist_and_is_it_a_file?
This method will add an additional File.file? check.
#
53 54 55 56 |
# File 'lib/rbt/toplevel_methods/does_this_file_exist.rb', line 53 def self.does_this_file_exist_and_is_it_a_file?(i) i = i.to_s does_this_file_exist?(i) && File.file?(i) end |
.does_this_remote_url_exist?(i) ⇒ Boolean
#
RBT.does_this_remote_url_exist?
To test this method, try:
i = 'https://github.com/linuxwacom/libwacom/releases/download/libwacom-1.6/libwacom-1.6.tar.bz2'
RBT.does_this_remote_url_exist? i
#
18 19 20 |
# File 'lib/rbt/toplevel_methods/remote_url.rb', line 18 def self.does_this_remote_url_exist?(i) Wget.check_if_remote_file_exists(i) end |
.download(i = ARGV, optional_use_this_version = nil) ⇒ Object
#
RBT.download
This method can be used to download a remote source archive, if the argument is a symbol. Additionally direct URLs can also be given.
The second argument is optional. If given then the method will attempt to download only a specific version from the remote location. In order for this to work, the method may first have to “probe” whether the remote file exists. For this functionality, wget it used.
In general the method depends on “wget”, largely due to reasons of simplicity.
Invocation examples:
RBT.download :htop
RBT.download :php
RBT.download :libx11
#
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 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 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 |
# File 'lib/rbt/toplevel_methods/download.rb', line 35 def self.download( i = ARGV, optional_use_this_version = nil ) # ======================================================================= # # Treat all input as an Array. # ======================================================================= # i = [i].flatten.compact i.each {|remote_url| # ===================================================================== # # === Handle symbols next # # Symbols will be treated differently, as we can assume that a user # normally would not pass in a Symbol to the method. So if we see # a Symbol, then we can also handle this situation in a special # manner. # ===================================================================== # if remote_url.is_a? Symbol case remote_url when :pwd # This is special - we will take the dirname. remote_url = File.basename(Dir.pwd).to_s if Object.const_defined?(ProgramInformation) and (remote_url =~ /\d+/) # <- And if it has at the least one number. remote_url = ProgramInformation.return_short_name(remote_url) end remote_url = remote_url.delete('-').to_sym end remote_url = RBT.location_of?(remote_url) # <- This should return an Array. if remote_url.is_a? Array remote_url = remote_url.first end end # ===================================================================== # # Next, honour the situation where the user wants to specifically # download a specific version of a program. # ===================================================================== # if optional_use_this_version if optional_use_this_version.is_a? Hash if optional_use_this_version.has_key? :version optional_use_this_version = optional_use_this_version[:version] end end _ = optional_use_this_version # =================================================================== # # else it does not exist, so we try other archive formats. This # will be handled by the following Array. # =================================================================== # array_formats_to_check_for = %w( .tar.xz .tar.gz .tar.bz2 ) # =================================================================== # # The old URL will already be available in the variable remote_url. # =================================================================== # remote_url = RBT.return_remote_url_from_this_input( remote_url, optional_use_this_version ) require 'wget' if Wget.check_if_remote_file_exists(remote_url) array_formats_to_check_for = [] # Clear it here. else # ================================================================= # # We reject the ones that we already have checked before: # ================================================================= # array_formats_to_check_for.reject! {|entry| remote_url.end_with? entry } unless array_formats_to_check_for.empty? array_formats_to_check_for.each {|inner_entry| if Wget.check_if_remote_file_exists(inner_entry) # =========================================================== # # The next check is not ideal, but it may suffice for now. # After all we only need at the least one remote URl that # can be used. # =========================================================== # remote_url = inner_entry end } end end end if remote_url.empty? e "#{rev}The given #{crimson('URL')} was not found - "\ "thus, no download can occur." else e "Next downloading from the remote URL `#{sfancy(remote_url)}`." use_this_command = "wget #{remote_url}" e use_this_command result = `#{use_this_command} 2>&1` if result.include? 'ERROR 404: Not Found' e "No archive/program was found at the remote url #{remote_url}." end if File.exist? File.basename(remote_url) e "Success! The file can be found at `"\ "#{sfile( File.absolute_path(File.basename(remote_url)) )}`." end end } end |
.download_all_source_archives(i = ARGV) ⇒ Object
#
RBT.download_all_source_archives
#
142 143 144 |
# File 'lib/rbt/toplevel_methods/download.rb', line 142 def self.download_all_source_archives(i = ARGV) RBT::Cookbooks::DownloadAllSourceArchives.new(i) end |
.dual_compile(this_program = ARGV) ⇒ Object
#
RBT.dual_compile
This method will first compile a program in the traditional manner, via the prefix /usr, before it will compile the same program again via its AppDir prefix.
#
18 19 20 21 22 23 24 25 |
# File 'lib/rbt/toplevel_methods/dual_compile.rb', line 18 def self.dual_compile( this_program = ARGV ) [this_program].flatten.compact.each {|this_program| RBT::Compile.new(this_program) {{ use_this_prefix: :trad }} RBT::Compile.new(this_program) {{ use_this_prefix: :appdir }} } end |
.e(i = '') ⇒ Object
#
RBT.e
This method is just a little (short) wrapper over puts.
#
14 15 16 |
# File 'lib/rbt/toplevel_methods/e.rb', line 14 def self.e(i = '') puts i end |
.editor?(i = @use_this_editor) ⇒ Boolean
#
RBT.editor?
#
36 37 38 39 40 |
# File 'lib/rbt/toplevel_methods/editor.rb', line 36 def self.editor?( i = @use_this_editor ) i end |
.email? ⇒ Boolean
#
RBT.email?
#
10 11 12 13 14 15 |
# File 'lib/rbt/toplevel_methods/email.rb', line 10 def self.email? begin require 'rbt/configuration/configuration.rb' rescue LoadError; end RBT.configuration?.email.to_s end |
.enable_md5sum_calculation ⇒ Object
#
RBT.enable_md5sum_calculation
Use this method to disable the md5sum calculation altogether.
#
52 53 54 |
# File 'lib/rbt/toplevel_methods/md5sum.rb', line 52 def self.enable_md5sum_calculation @display_md5sum = true end |
.enable_module_programs(also_add_reader_methods = true) ⇒ Object
#
RBT.enable_module_programs
This method will be invoked when we require the cookbooks project in a special manner.
We add the individual cookbooks onto the Cookbooks. namespace directly there.
This will then allow us to call methods such as:
RBT.htop
Do note that we will also radically override already existing methods, so this is functionality that should be used with care.
Testing this method can happen either like this:
RBT.enable_module_programs; RBT.htop
require 'rbt/module_programs'; htop = RBT.htop
require 'rbt/toplevel_methods/module_programs.rb'; RBT.enable_module_programs; htop = RBT.htop.hash?
#
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/rbt/toplevel_methods/module_programs.rb', line 33 def self.enable_module_programs( also_add_reader_methods = true ) require 'rbt/requires/require_the_cookbook_class.rb' available_programs?.each {|this_program| self.class.class_eval { _ = this_program.to_sym if respond_to? _ # This here happens when we enable the methods. # This is just here as a placeholder, if we ever want # to debug this. else # ::RBT.e 'Defining the method `'+_.to_s+'` next.' # <- This is more o a debug-statement. define_method(_) { # Simply delegate to class Cookbook then. RBT::Cookbooks::Cookbook.new(this_program) } # ================================================================= # # We will additionally add reader-methods, if the argument is # set to true. These reader methods will directly return the # dataset, as a Hash. # # This can be tested like so in IRB: # # require 'rbt/module_programs'; x = RBT.htop.hash? # # ================================================================= # if also_add_reader_methods define_method(_.to_s+'?') { # Simply delegate to class Cookbook then. RBT::Cookbooks::Cookbook.new(this_program).hash? } end end } } end |
.enable_opn ⇒ Object
#
RBT.enable_opn
#
41 42 43 |
# File 'lib/rbt/toplevel_methods/opn.rb', line 41 def self.enable_opn @use_opn = true end |
.encoding? ⇒ Boolean
#
RBT.encoding?
Query-method to ask which main encoding is in use for the Cookbooks project.
#
36 37 38 |
# File 'lib/rbt/encoding/encoding.rb', line 36 def self.encoding? USE_THIS_ENCODING end |
.ensure_that_the_required_directories_exist(use_this_as_directory = RBT.store_into_this_directory?, be_verbose = false) ⇒ Object
#
RBT.ensure_that_the_required_directories_exist
This method ensures that the base-directory exists.
This can also be invoked from the commandline, by issuing:
rbt --ensure-that-the-required-directories-exist
#
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/rbt/toplevel_methods/ensure_that_the_required_directories_exist.rb', line 22 def self.ensure_that_the_required_directories_exist( use_this_as_directory = RBT.store_into_this_directory?, be_verbose = false ) if block_given? yielded = yield case yielded when :be_verbose be_verbose = true when :be_quiet be_verbose = false end end if Dir.exist?(use_this_as_directory) if be_verbose opn; e "The directory at `#{use_this_as_directory}` "\ "already exists." end else target = File.dirname(use_this_as_directory) if File.writable?(target) require 'fileutils' opn; e "Creating directory `#{use_this_as_directory}`." FileUtils.mkdir_p(use_this_as_directory) else e "Can not write into the directory "\ "`#{use_this_as_directory}` as it is not writable. "\ "Consider using" e 'another setting for temp_directory.yml perhaps.' e e 'This file can be found here:' e e " #{file_temp_directory}" e end end end |
.error_message? ⇒ Boolean
#
RBT.error_message?
#
28 29 30 |
# File 'lib/rbt/toplevel_methods/error_message.rb', line 28 def self. @error_message end |
.esystem(i = '') ⇒ Object
#
RBT.esystem
This method will output which system-command will be run; and then this command will be run, via system().
The argument to this method determines the system command at hand.
#
19 20 21 22 23 24 25 26 27 28 |
# File 'lib/rbt/toplevel_methods/esystem.rb', line 19 def self.esystem( i = '' ) if i.is_a? Array i.each {|entry| esystem(entry) } else e i system i end end |
.ewarn(i = '') ⇒ Object
#
RBT.ewarn
#
29 30 31 |
# File 'lib/rbt/colours/swarn.rb', line 29 def self.ewarn(i = '') e ::RBT.swarn(i) end |
.expand_cookbooks(i = ARGV) ⇒ Object
#
RBT.expand_cookbooks
The first argument should be the program whose .yml file we wish to autogenerate, such as 'subversion' or 'htop' or 'ruby'.
#
296 297 298 299 300 |
# File 'lib/rbt/utility_scripts/expand_cookbooks.rb', line 296 def self.( i = ARGV ) RBT::Cookbooks::ExpandCookbooks.new(i) end |
.extract(i, extract_to_this_directory = return_pwd) ⇒ Object
#
RBT.extract
This toplevel-method can be used to extract an archive, such as “foobar.tar.xz”.
The functionality depends on the gem called extracter.
#
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/rbt/toplevel_methods/extract.rb', line 24 def self.extract( i, extract_to_this_directory = return_pwd ) unless Object.const_defined? :Extracter e 'RBT can not extract anything as the gem extracter '\ '(module Extracter) is not installed.' return end [i].flatten.compact.each {|this_program| Extracter.extract_this( i, to: extract_to_this_directory ) } end |
.fast_return_file_size_of_this_program(i) ⇒ Object
#
RBT.fast_return_file_size_of_this_program
This method will quickly return the file size of the given input program. It relies on the expanded cookbook dataset for this.
Invocation example from ruby:
RBT.fast_return_file_size_of_this_program(:htop) # => 213004
#
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/rbt/toplevel_methods/fast_return_file_size_of_this_program.rb', line 25 def self.fast_return_file_size_of_this_program(i) if i.is_a? Array i = i.join(' ').strip end i = i.to_s unless i.is_a? String if File.directory? RBT. # ===================================================================== # # Obtain the path to the expanded-cookbook .yml file next. # ===================================================================== # target_file = "#{RBT.}#{i}.yml" if File.exist? target_file dataset = YAML.load_file(target_file) archive_size = dataset['archive_size'] return archive_size else e "No file exists at `#{target_file}`" end else e "No directory exists at "\ "#{RBT.}" end end |
.favicon? ⇒ Boolean
#
RBT.favicon?
This is currently hardcoded. Users of RBT will not need this image.
#
12 13 14 15 |
# File 'lib/rbt/toplevel_methods/favicon.rb', line 12 def self.favicon? '/home/x/DATA/PROGRAMMING_LANGUAGES/RUBY/src/rbt/img/'\ 'COOKBOOKS_LOGO.png' end |
.feedback_available_programs ⇒ Object
#
RBT.feedback_available_programs
This method will report to the user, in a more verbose manner, which specific programs are registered in the RBT-project.
#
97 98 99 100 101 102 103 104 105 106 |
# File 'lib/rbt/toplevel_methods/available_programs.rb', line 97 def self.feedback_available_programs result = ''.dup # Build up the return String. opn; e "Feedbacking all available programs next,"\ " #{available_programs.size} of them." available_programs?.each_with_index {|entry, index| index += 1 result << "(#{simp(index.to_s.rjust(3))}) #{sfancy(entry)}#{N}" } e result end |
.feedback_description_of(i) ⇒ Object
127 128 129 130 131 |
# File 'lib/rbt/cookbooks/cookbook/cookbook.rb', line 127 def self.feedback_description_of(i) i = i.first if i.is_a? Array _ = RBT::Cookbooks::Cookbook.new(i) _.feedback_description end |
.feedback_licenses ⇒ Object
#
RBT.feedback_licenses
#
181 182 183 |
# File 'lib/rbt/cookbooks/feedback_licenses.rb', line 181 def self.feedback_licenses RBT::Cookbooks::FeedbackLicenses.new end |
.feedback_program_description(i = ARGV) ⇒ Object
#
RBT.feedback_program_description
This method will feedback the description of the program at hand, on the commandline..
#
17 18 19 20 21 22 23 24 |
# File 'lib/rbt/toplevel_methods/feedback_program_description.rb', line 17 def self.feedback_program_description( i = ARGV ) i = i.first if i.is_a? Array hash = RBT::Cookbooks::RawCookbook.new(i).hash? description = hash['description'] e description end |
.feedback_url(i = ARGV) ⇒ Object
#
RBT.feedback_url
#
68 69 70 |
# File 'lib/rbt/cookbooks/display_cookbook_dataset/feedback/feedback_url.rb', line 68 def self.feedback_url(i = ARGV) RBT::Cookbooks::DisplayCookbookDataset::Feedback.feedback_url end |
.file_allowed_tags ⇒ Object
#
RBT.file_allowed_tags
This method will return the path to the allowed_tags (a yaml file).
#
263 264 265 |
# File 'lib/rbt/constants/file_and_directory_constants.rb', line 263 def self. "#{RBT.project_yaml_directory?}specification/allowed_tags.yml" end |
.file_available_programs_versions ⇒ Object
#
RBT.file_available_programs_versions
#
167 168 169 |
# File 'lib/rbt/constants/file_and_directory_constants.rb', line 167 def self.file_available_programs_versions "#{RBT.project_yaml_directory?}programs_version/available_programs_versions.md" end |
.file_colours ⇒ Object
#
RBT.file_colours
#
31 32 33 |
# File 'lib/rbt/colours/use_colours.rb', line 31 def self.file_colours "#{RBT.project_yaml_directory?}colours/colours.yml" end |
.file_compiled_programs ⇒ Object
#
RBT.file_compiled_programs
This method will return a location such as “/Depot/Temp/rbt/compiled_programs.yml”.
Note that from this you can also obtain the “last compiled program”.
#
153 154 155 |
# File 'lib/rbt/configuration/configuration.rb', line 153 def self.file_compiled_programs "#{RBT.rbt_log_directory?}compiled_programs.yml" end |
.file_compiled_programs? ⇒ Boolean
#
RBT.file_compiled_programs?
Specify the target location for the compiled_programs.yml file.
#
124 125 126 |
# File 'lib/rbt/configuration/configuration.rb', line 124 def self.file_compiled_programs? "#{RBT.rbt_log_directory?}compiled_programs.yml" end |
.file_configure_database? ⇒ Boolean
#
RBT.file_configure_database?
#
115 116 117 |
# File 'lib/rbt/configuration/configuration.rb', line 115 def self.file_configure_database? "#{RBT.rbt_log_directory?}configure_command_database.yml" end |
.file_cookbook_aliases ⇒ Object
#
RBT.file_cookbook_aliases
Simply return where the cookbook_aliases.yml file resides.
This is, for instance, here:
/Programs/Ruby/2.5.1/lib/ruby/site_ruby/2.5.0/rbt/yaml/cookbook_aliases.yml
#
144 145 146 |
# File 'lib/rbt/constants/file_and_directory_constants.rb', line 144 def self.file_cookbook_aliases "#{RBT.project_yaml_directory?}cookbook_aliases.yml" end |
.file_cookbook_chained_programs ⇒ Object
#
RBT.file_cookbook_chained_programs
This is the preferred way to determine where the file “cookbook_chained_programs.yml” can be found.
#
307 308 309 |
# File 'lib/rbt/constants/file_and_directory_constants.rb', line 307 def self.file_cookbook_chained_programs "#{RBT.project_yaml_directory?}chained_programs.yml" end |
.file_database_installed_files ⇒ Object
#
RBT.file_database_installed_files
On my system, this will be at:
/Depot/Information/database_installed_files.yml
#
101 102 103 |
# File 'lib/rbt/configuration/configuration.rb', line 101 def self.file_database_installed_files "#{YAML_DATABASE_DIRECTORY}database_installed_files.yml" end |
.file_global_flags ⇒ Object
#
RBT.file_global_flags
#
330 331 332 |
# File 'lib/rbt/constants/file_and_directory_constants.rb', line 330 def self.file_global_flags "#{RBT.project_yaml_directory?}global_flags.yml" end |
.file_installation_procedere ⇒ Object
#
RBT.file_installation_procedere
This may refer to the path of the file called 'installation_procedere.yml'.
#
177 178 179 |
# File 'lib/rbt/constants/file_and_directory_constants.rb', line 177 def self.file_installation_procedere "#{RBT.project_yaml_directory?}installation_procedere.yml" end |
.file_is_on_gobolinux ⇒ Object
#
RBT.file_is_on_gobolinux
#
283 284 285 |
# File 'lib/rbt/constants/file_and_directory_constants.rb', line 283 def self.file_is_on_gobolinux "#{RBT.log_directory?}is_on_gobolinux" end |
.file_last_compiled_program ⇒ Object
#
RBT.file_last_compiled_program
#
347 348 349 |
# File 'lib/rbt/constants/file_and_directory_constants.rb', line 347 def self.file_last_compiled_program "#{RBT.log_directory?}last_compiled_programs.yml" end |
.file_last_symlinked_program? ⇒ Boolean
#
RBT.file_last_symlinked_program?
#
376 377 378 |
# File 'lib/rbt/constants/file_and_directory_constants.rb', line 376 def self.file_last_symlinked_program? "#{RBT.log_directory?}last_symlinked_program.yml" end |
.file_predefined_installation_instructions(use_this_directory = RBT.project_yaml_directory?) ⇒ Object
#
RBT.file_predefined_installation_instructions
Method to return where the file location is. There used to be a constant available called FILE_PREDEFINED_INSTALLATION_INSTRUCTIONS but this was removed in January 2019.
#
31 32 33 34 35 |
# File 'lib/rbt/constants/predefined_installation_instructions.rb', line 31 def self.file_predefined_installation_instructions( use_this_directory = RBT.project_yaml_directory? ) "#{use_this_directory}predefined_installation_instructions.yml" end |
.file_programs_directory ⇒ Object
#
RBT.file_programs_directory
#
383 384 385 |
# File 'lib/rbt/constants/file_and_directory_constants.rb', line 383 def self.file_programs_directory "#{RBT.project_yaml_directory?}configuration/programs_directory.yml" end |
.file_programs_version ⇒ Object
#
RBT.file_programs_version
#
160 161 162 |
# File 'lib/rbt/constants/file_and_directory_constants.rb', line 160 def self.file_programs_version "#{RBT.project_yaml_directory?}programs_version/programs_version.yml" end |
.file_programs_version_url ⇒ Object
#
RBT.file_programs_version_url
This is the path to the .md file that keeps track of the programs-version and URL entries.
#
393 394 395 |
# File 'lib/rbt/constants/file_and_directory_constants.rb', line 393 def self.file_programs_version_url "#{RBT.log_dir?}CookbookDirectory/programs_version_url.md" end |
.file_registered_binaries ⇒ Object
#
RBT.file_registered_binaries
This method should be used preferentially, rather than the older constant.
#
93 94 95 |
# File 'lib/rbt/toplevel_methods/all_binaries.rb', line 93 def self.file_registered_binaries "#{RBT.yaml_directory_for_the_registered_yaml_files?}binaries.yml" end |
.file_registered_cookbook_entries(use_this_directory = yaml_directory? ) ⇒ Object
#
RBT.file_registered_cookbook_entries
Tell use where the file registered_cookbook_entries.yml is stored.
On my home system this may return a String such as:
/home/Programs/Ruby/2.7.1/lib/ruby/site_ruby/2.7.0/rbt/yaml/specification/registered_cookbook_entries.yml
#
37 38 39 40 41 |
# File 'lib/rbt/constants/registered_cookbook_entries.rb', line 37 def self.file_registered_cookbook_entries( use_this_directory = yaml_directory? ) "#{use_this_directory}specification/registered_cookbook_entries.yml" end |
.file_registered_gir_files ⇒ Object
#
RBT.file_registered_gir_files
#
29 30 31 |
# File 'lib/rbt/registered/registered_gir_files.rb', line 29 def self.file_registered_gir_files FILE_REGISTERED_GIR_FILES end |
.file_registered_headers ⇒ Object
#
RBT.file_registered_headers
#
408 409 410 |
# File 'lib/rbt/constants/file_and_directory_constants.rb', line 408 def self.file_registered_headers "#{RBT.project_yaml_directory?}registered/headers.yml" end |
.file_registered_libraries ⇒ Object
#
RBT.file_registered_libraries
#
41 42 43 |
# File 'lib/rbt/toplevel_methods/all_libraries.rb', line 41 def self.file_registered_libraries "#{RBT.yaml_directory_for_the_registered_yaml_files?}libraries.yml" end |
.file_registered_m4_files ⇒ Object
#
RBT.file_registered_m4_files
#
24 25 26 |
# File 'lib/rbt/registered/registered_m4_files.rb', line 24 def self.file_registered_m4_files "#{RBT.yaml_directory_for_the_registered_yaml_files?}m4.yml" end |
.file_registered_pkgconfig_files ⇒ Object
#
RBT.file_registered_pkgconfig_files
#
29 30 31 |
# File 'lib/rbt/registered/registered_pkgconfig_files.rb', line 29 def self.file_registered_pkgconfig_files FILE_REGISTERED_PKGCONFIG_FILES end |
.file_registered_tags? ⇒ Boolean
#
RBT.file_registered_tags?
#
31 32 33 |
# File 'lib/rbt/registered/registered_tags.rb', line 31 def self. "#{RBT.yaml_directory?}registered_tags.yml" end |
.file_short_tutorial? ⇒ Boolean
#
RBT.file_short_tutorial?
#
117 118 119 |
# File 'lib/rbt/constants/file_and_directory_constants.rb', line 117 def self.file_short_tutorial? FILE_SHORT_TUTORIAL end |
.file_source_directory ⇒ Object
#
RBT.file_source_directory
#
47 48 49 |
# File 'lib/rbt/toplevel_methods/source_base_directory.rb', line 47 def self.file_source_directory "#{RBT.configuration_directory?}source_directory.yml" end |
.file_source_directory? ⇒ Boolean
#
RBT.file_source_directory?
This method may return a path such as:
/home/Programs/Ruby/2.7.1/lib/ruby/site_ruby/2.7.0/rbt/yaml/configuration/configuration/source_directory.yml
#
209 210 211 |
# File 'lib/rbt/constants/file_and_directory_constants.rb', line 209 def self.file_source_directory? "#{RBT.configuration_directory?}source_directory.yml" end |
.file_specification_of_registered_cookbook_entries(use_this_directory = yaml_directory? ) ⇒ Object
#
RBT.file_specification_of_registered_cookbook_entries
#
46 47 48 49 50 |
# File 'lib/rbt/constants/registered_cookbook_entries.rb', line 46 def self.file_specification_of_registered_cookbook_entries( use_this_directory = yaml_directory? ) "#{use_this_directory}specification/specification_of_registered_cookbook_entries.yml" end |
.file_status ⇒ Object
#
RBT.file_status
#
131 132 133 |
# File 'lib/rbt/configuration/configuration.rb', line 131 def self.file_status "#{RBT.rbt_log_directory?}status.yml" end |
.file_storing_the_time_it_took_to_compile_programs ⇒ Object
#
RBT.file_storing_the_time_it_took_to_compile_programs
Use this method variant here rather than the constant. Reason is that the method assembles its method dynamically.
#
228 229 230 |
# File 'lib/rbt/constants/file_and_directory_constants.rb', line 228 def self.file_storing_the_time_it_took_to_compile_programs "#{RBT.log_directory?}database_storing_compile_times.yml" end |
.file_temp_directory ⇒ Object
#
RBT.file_temp_directory
This reader method will return the location to the file named “temp_directory.yml”, as a String.
On my system, the method may return a String such as
"/Programs/Ruby/2.5.1/lib/ruby/site_ruby/2.5.0/rbt/yaml/configuration/temp_directory.yml"
#
44 45 46 |
# File 'lib/rbt/toplevel_methods/temp_directory.rb', line 44 def self.file_temp_directory "#{RBT.configuration_directory?}temp_directory.yml" end |
.file_use_colours?(use_this_directory = @configuration_directory) ⇒ Boolean
#
RBT.file_use_colours?
This method will point to a path such as:
/Programs/Ruby/2.5.1/lib/ruby/site_ruby/2.5.0/rbt/yaml/configuration/use_colours.yml
#
58 59 60 61 62 |
# File 'lib/rbt/toplevel_methods/configuration_directory.rb', line 58 def self.file_use_colours?( use_this_directory = @configuration_directory ) "#{use_this_directory}use_colours.yml" end |
.file_use_psych_or_syck ⇒ Object
#
RBT.file_use_psych_or_syck
#
46 47 48 |
# File 'lib/rbt/toplevel_methods/configuration_directory.rb', line 46 def self.file_use_psych_or_syck "#{@configuration_directory}use_psych_or_syck.yml" end |
.file_use_yaml_database_for_tags ⇒ Object
#
RBT.file_use_yaml_database_for_tags
#
197 198 199 |
# File 'lib/rbt/constants/file_and_directory_constants.rb', line 197 def self. "#{RBT.configuration_directory?}use_yaml_database_for_tags.yml" end |
.filelist_parser(i) ⇒ Object
#
RBT.filelist_parser
#
233 234 235 |
# File 'lib/rbt/linux/slackware/filelist_parser.rb', line 233 def self.filelist_parser(i) RBT::Linux::Slackware::FilelistParser[i] end |
.find_alternative_archive(i = ARGV) ⇒ Object
#
RBT.find_alternative_archive
#
188 189 190 |
# File 'lib/rbt/utility_scripts/find_alternative_archive.rb', line 188 def self.find_alternative_archive(i = ARGV) RBT::FindAlternativeArchive.new(i) end |
.find_cookbook_alias_for(i) ⇒ Object
82 83 84 |
# File 'lib/rbt/toplevel_methods/is_included.rb', line 82 def self.find_cookbook_alias_for(i) RBT::Cookbooks::Aliases.new(i).value? end |
.find_headers(i = ARGV) ⇒ Object
#
RBT.find_headers
This method exists mostly because it is more convenient to type it.
Invocation example:
RBT.find_headers('libxcb')
#
132 133 134 |
# File 'lib/rbt/cookbooks/find_headers.rb', line 132 def self.find_headers(i = ARGV) RBT::Cookbooks::FindHeaders.new(i) end |
.find_multiple_versions ⇒ Object
#
RBT.find_multiple_versions
#
121 122 123 |
# File 'lib/rbt/utility_scripts/find_multiple_versions.rb', line 121 def self.find_multiple_versions RBT::Cookbooks::FindMultipleVersions.new end |
.find_url_for(i = ARGV, return_as_string = false) ⇒ Object
#
RBT.find_url_for
Use this method to find a specific URL quickly.
The method will return the first URL always, also called url1.
The method will also try to return url2 - and hence return an Array, if possible. Keep this in mind that you may have an Array as result from this method.
Usage example:
RBT.find_url_for()
RBT.find_url_for(:htop) # => ["http://hisham.hm/htop/releases/2.2.0/htop-2.2.0.tar.gz", "http://hisham.hm/htop/index.php?page=downloads"]
RBT.url_for? :patch # => ["https://ftp.gnu.org/pub/gnu/patch/patch-2.7.6.tar.xz", "http://ftp.gnu.org/gnu/patch/?C=M;O=D"]
#
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/rbt/toplevel_methods/find_url_for.rb', line 31 def self.find_url_for( i = ARGV, return_as_string = false ) case return_as_string when :return_as_string return_as_string = true end i = i.first if i.is_a? Array i = i.to_s # ======================================================================= # # Next, we will try to use the expanded dataset, if it exists. This # will be MUCH faster than instantiating a new ruby object, as is # done in the else clause. The drawback is that the expanded dataset # may not always have the most-up-to-date content. # ======================================================================= # = RBT.return_location_to_this_programs_yaml_file(i) if File.exist? if i.end_with? '.yml' i = i.dup if i.frozen? i.sub!(/\.yml$/,'') end dataset = YAML.load_file() if dataset.has_key?(i) dataset = dataset[i] end url1 = dataset['url1'] # Is a String. url2 = dataset['url2'] # Is a String. else # ===================================================================== # # Else we will instantiate a new, costly Cookbook instance. # ===================================================================== # _ = RBT.raw_cookbook(i) url1 = _.url1? # Return the URL here. url2 = _.url2? end url1 = url1.to_s.strip url2 = url2.to_s.strip if return_as_string url1.to_s else return [ url1, url2 ] end end |
.fix_chown_root_entries_in_this_file(this_file = 'Makefile') ⇒ Object
#
RBT.fix_chown_root_entries_in_this_file
This method can be used to replace all “chown root:root” entries with “chown 0:0” entries. It may be necessary for when we have setup a chroot.
#
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 |
# File 'lib/rbt/toplevel_methods/misc.rb', line 94 def self.fix_chown_root_entries_in_this_file( this_file = 'Makefile' ) what = ''.dup if File.exist? this_file File.readlines(this_file).each {|this_entry| if this_entry.include? 'chown root:root' this_entry.gsub!(/root:root/, '0:0') end what << this_entry } e "Now modifying the file `#{sfile(this_file)}`." write_what_into(what, this_file) end end |
.fix_incorrect_symlinks ⇒ Object
#
RBT.fix_incorrect_symlinks
#
12 13 14 15 16 17 18 |
# File 'lib/rbt/toplevel_methods/fix_incorrect_symlinks.rb', line 12 def self.fix_incorrect_symlinks unless Object.const_defined?(:RBT) and RBT.const_defined?(:CheckForInvalidCurrentSymlinks) require 'rbt/utility_scripts/check_for_invalid_current_symlinks.rb' end ::RBT::CheckForInvalidCurrentSymlinks.new('--autocorrect') end |
.fix_libtool_la_file_from_saved_file ⇒ Object
#
RBT.fix_libtool_la_file_from_saved_file
#
182 183 184 |
# File 'lib/rbt/libtool/remove_this_entry.rb', line 182 def self.fix_libtool_la_file_from_saved_file RBT::Libtool.new.remove_the_last_faulty_libtool_entry_stored_in_a_file end |
.forestgreen(i = '') ⇒ Object
#
RBT.forestgreen
#
124 125 126 127 |
# File 'lib/rbt/colours/html_colours.rb', line 124 def self.forestgreen(i = '') return COLOURS.forestgreen(i) if use_colours? i end |
.generate_global_yaml_database ⇒ Object
#
RBT.generate_global_yaml_database
#
120 121 122 |
# File 'lib/rbt/generate_files/create_global_yaml_database.rb', line 120 def self.generate_global_yaml_database RBT::Cookbooks::CreateGlobalYamlDatabase.new end |
.generate_pdf_tutorial ⇒ Object
#
RBT.generate_pdf_tutorial
#
101 102 103 |
# File 'lib/rbt/generate_files/generate_pdf_tutorial.rb', line 101 def self.generate_pdf_tutorial RBT::GeneratePdfTutorial.new end |
.generate_pdf_tutorial_then_upload_it ⇒ Object
#
RBT.generate_pdf_tutorial_then_upload_it
Use this method to upload the .pdf tutorial to a remote host.
#
110 111 112 113 114 115 116 117 |
# File 'lib/rbt/generate_files/generate_pdf_tutorial.rb', line 110 def self.generate_pdf_tutorial_then_upload_it RBT.generate_pdf_tutorial # Next comes the upload part. require 'ftp_paradise/without_gui_bindings' connection = FtpParadise.connect to: :shevy connection.set_to_binary_mode connection.upload_this_file RBT::GeneratePdfTutorial.store_pdf_file_where? end |
.generate_programs_version_yaml_file(use_this_dataset = nil) ⇒ Object
#
RBT.generate_programs_version_yaml_file
This method will create one big yaml file that is a Hash. This big Hash will have the name of all programs and the corresponding version of said programs.
The key will be the name of the program and the value will be the respective program version.
You can also pass in your own dataset. If you do so, remember to use a hash, with specific key->value pairs that reflect the name of the program and the specific version of said program.
You can invoke this method from the commandline, by issuing:
rbt --generate_version_file
#
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/rbt/toplevel_methods/generate_programs_version_yaml_file.rb', line 37 def self.generate_programs_version_yaml_file( use_this_dataset = nil ) _ = ''.dup # We will append onto this String. unless use_this_dataset # This is the default behaviour/clause. hash = {} # We store into this hash here. target = RUBY_SRC_DIR_RBT_YAML+'programs_version/available_programs_versions.md' if is_on_roebe? e 'Reading in the dataset from this file:' e e sfile(" #{target}") e end unless File.exist? target e 'No file was found at '+sfile(target)+'.' exit end dataset = File.readlines(target) dataset.each {|line| splitted = line.split(' ').map(&:strip) opn; e "Now working on the program "\ "`#{Colours.lightgray(splitted[0])}`." # =================================================================== # # Add onto the Hash next. Should keep it as a String. # =================================================================== # hash[splitted[0].downcase] = splitted[1].to_s } use_this_dataset = hash end use_this_dataset.each_pair {|key, value| value = '"'+value.to_s+'"' unless value.include? '"' _ << key.to_s+': '+value.to_s+N } # ======================================================================= # # Ok, now we should have all programs and the respective version # at hand - we can store it next. In the past, this made use of # YAML.dump() but for some strange reason, YAML.dump() gave strange # results; which is why I decided to generate the .yml file # on my own. # ======================================================================= # what = _ into = "#{RBT.yaml_directory?}programs_version/programs_version.yml" opn; e "Will also store into `#{sfile(into)}`." write_what_into(what, into) # Store into the file programs_version.yml # ======================================================================= # # Store for my home-system as well. # ======================================================================= # if is_roebe? # On my system. into = "#{RUBY_SRC_DIR_RBT}yaml/programs_version/programs_version.yml" opn; e "Will also store into `#{sfile(into)}`." write_what_into(what, into) end end |
.generate_slackware_description_file(i, &block) ⇒ Object
#
RBT.generate_slackware_description_file
#
347 348 349 |
# File 'lib/rbt/linux/slackware/generate_slack_desc_file.rb', line 347 def self.generate_slackware_description_file(i, &block) RBT::Linux::Slackware::GenerateSlackDescFile[i, &block].path? end |
.get_all_directories_from(here = return_pwd, return_full_path = false) ⇒ Object
#
RBT.get_all_directories_from
This will return all directories.
Invocation example:
RBT.get_all_directories_from('/home/x/src/')
#
21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/rbt/toplevel_methods/get_all_directories_from.rb', line 21 def self.get_all_directories_from( here = return_pwd, return_full_path = false ) here << '/' unless here.end_with? '/' _ = Dir["#{here}*"] _.select! {|entry| File.directory?(entry) } result = _.map {|entry| "#{entry}/" } if return_full_path result.map! {|line| File.absolute_path(line) } end return result.sort # Keep the result sorted. end |
.get_all_files_from(this_dir = return_pwd, return_full_path = true, include_hidden_files = false) ⇒ Object
#
RBT.get_all_files_from
We will only obtain files through this method here.
#
16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/rbt/toplevel_methods/get_all_files_from.rb', line 16 def self.get_all_files_from( this_dir = return_pwd, return_full_path = true, include_hidden_files = false ) this_dir = return_pwd if this_dir.nil? _ = this_dir.dup _ << '/*' unless _.end_with? '/*' _ = rds(_) # Make use of RBT:rds() here. _ = Dir[_].select {|entry| File.file?(entry) } return _ end |
.get_date ⇒ Object
#
RBT.get_date
As of Sep 2014, this method will return a string such as:
"12 Jan 2015"
#
41 42 43 44 45 46 47 48 |
# File 'lib/rbt/toplevel_methods/time.rb', line 41 def self.get_date current_day = Time.now.strftime('%d') # This will return a string such as "30". current_day+ ' '+ Date::MONTHNAMES[Date.today.month][0,3]+ ' '+ Time.now.strftime('%Y') end |
.get_files_and_directories_from(here = return_pwd) ⇒ Object
#
RBT.get_files_and_directories_from
Simply combine RBT.get_all_directories_from and RBT.get_files_from via this method here.
#
19 20 21 22 23 24 25 |
# File 'lib/rbt/toplevel_methods/get_all_files_and_directories_from.rb', line 19 def self.get_files_and_directories_from( here = return_pwd ) _ = get_all_directories_from(here)+ get_all_files_from(here) return _.flatten end |
.gobolinux_naming_convention(i) ⇒ Object
#
RBT.gobolinux_naming_convention
Easier toplevel method for accessing the functionality of class RBT::GobolinuxNamingConvention.
#
142 143 144 145 |
# File 'lib/rbt/linux/gobolinux/gobolinux_naming_convention.rb', line 142 def self.gobolinux_naming_convention(i) i = i.first if i.is_a? Array RBT::Gobolinux::NamingConvention.new(i).translated_name? end |
.gold(i = '') ⇒ Object
#
RBT.gold
#
100 101 102 103 |
# File 'lib/rbt/colours/html_colours.rb', line 100 def self.gold(i = '') return COLOURS.gold(i) if use_colours? i end |
.handle_this_extract_related_user_input(i) ⇒ Object
#
RBT.handle_this_extract_related_user_input
This method will either extract the given user input, such as “htop-2.2.tar.gz”, or it may attempt to download the remote dataset associated with a given program at hand.
#
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/rbt/toplevel_methods/handle_this_extract_related_user_input.rb', line 19 def self.( i ) i = [i].flatten.compact.each {|user_input| if File.exist? user_input RBT.extract(user_input) else RBT.download(user_input.to_sym) possible_matches = Dir[user_input.to_s+'*'] this_directory = possible_matches.select {|line| File.file?(line) and is_an_archive?(line) }.first RBT.extract(this_directory) exit end } end |
.has_an_error_occurred? ⇒ Boolean
#
RBT.has_an_error_occurred?
#
21 22 23 |
# File 'lib/rbt/toplevel_methods/error_message.rb', line 21 def self.has_an_error_occurred? !@error_message.empty? end |
.hash_aliases_to_the_available_programs? ⇒ Boolean
#
RBT.hash_aliases_to_the_available_programs?
Query method over the available aliases to the given programs. This will include the abbreviations, too.
Usage example:
RBT.hash_aliases_to_the_available_programs?['libxshmfenc'] # => "libxshmfence"
#
375 376 377 |
# File 'lib/rbt/toplevel_methods/available_programs.rb', line 375 def self.hash_aliases_to_the_available_programs? @hash_aliases_to_the_available_programs end |
.hash_registered_binaries? ⇒ Boolean
#
RBT.hash_registered_binaries?
This method is similar to the method RBT.registered_binaries? - but rather than an Array we will return the original Hash.
#
236 237 238 |
# File 'lib/rbt/registered/registered_binaries.rb', line 236 def self.hash_registered_binaries? ALL_BINARIES end |
.highest(n = DISPLAY_N_PROGRAMS_BY_DEFAULT) ⇒ Object
291 292 293 |
# File 'lib/rbt/cookbooks/highest.rb', line 291 def self.highest(n = DISPLAY_N_PROGRAMS_BY_DEFAULT) RBT::Cookbooks::Highest.new(n) end |
.home_dir? ⇒ Boolean
#
RBT.home_dir?
This should default towards /root or the user's home directory.
For example, for the superuser on a system, this will expand into “/root/” or “/home/debug/”.
The method will ensure that a trailing '/' is part of the result.
#
19 20 21 |
# File 'lib/rbt/toplevel_methods/home_dir.rb', line 19 def self.home_dir? ("#{ENV['HOME']}/").squeeze('/') end |
.host_cpu? ⇒ Boolean
#
RBT.host_cpu?
#
56 57 58 |
# File 'lib/rbt/toplevel_methods/misc.rb', line 56 def self.host_cpu? HOST_CPU end |
.infer_build_system(i = :infer_automatically, program_path = nil, depends_on = nil, optional_hash = {}) ⇒ Object
#
RBT.infer_build_system
This method will return a String, indicating which build system is most likely to be used for a given program at hand.
#
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 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 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 |
# File 'lib/rbt/toplevel_methods/infer_build_system.rb', line 20 def self.infer_build_system( i = :infer_automatically, program_path = nil, depends_on = nil, # ← This optional argument can be an Array. optional_hash = {} ) dataset_from_build_systems_priorities = YAML.load_file( FILE_BUILD_SYSTEMS_PRIORITIES ) case i when nil, :default i = :infer_automatically end use_a_build_directory = false use_this_build_system = 'configure' # ← Default value. unless optional_hash.empty? if optional_hash.has_key? :use_a_build_directory if optional_hash[:use_a_build_directory] == true use_a_build_directory = true end end end case i # ======================================================================= # # === :infer_automatically # # Must query whether we will try to infer the build system automatically. # ======================================================================= # when :infer_automatically use_this_build_system = nil # ← Default start value. # ===================================================================== # # We will simply iterate over the Array that originated from the # file 'build_systems_priorities.yml'. # ===================================================================== # dataset_from_build_systems_priorities.each {|this_entry| # =================================================================== # # We will only modify the above variable if it is nil, since that # means it has not yet been specified in more detail. # =================================================================== # if use_this_build_system.nil? case this_entry # ================================================================= # # === cmake # ================================================================= # when 'cmake' # =============================================================== # # === Handle cmake installation types next # # This ought to come quite early. # =============================================================== # if does_this_file_exist?(FILE_CMAKE_LISTS, use_a_build_directory) if depends_on and depends_on_cmake? use_this_build_system = 'cmake' else use_this_build_system = 'cmake' end end # ================================================================= # # === configure # ================================================================= # when 'configure' # =============================================================== # # === Check for GNU configure script # # This will check for configure. # =============================================================== # if does_this_file_exist?('configure', use_a_build_directory) use_this_build_system = 'configure' end # ================================================================= # # === meson # ================================================================= # when 'meson' # =============================================================== # # === Handle meson build next (meson tag) # # However had, some programs may have both a configure-script # and meson files. In this case, we have to determine which # one is to be run, which is done within the following # "elsif" clause. # =============================================================== # if meson_build_file_exists?(:default, use_a_build_directory) # In this case, handle meson. use_this_build_system = 'meson' if does_this_file_exist?('configure') and configure_has_a_higher_priority_than_meson? use_this_build_system = 'configure' end end # ================================================================= # # === waf # ================================================================= # when 'waf' # =============================================================== # # === Handle 'waf' installations next # =============================================================== # if does_this_file_exist?(FILE_WAF, use_a_build_directory) and !meson_build_file_exists? if depends_on and depends_on_waf? use_this_build_system = 'waf' else use_this_build_system = 'waf' end end # ================================================================= # # === scons # ================================================================= # when 'scons' # =============================================================== # # === Handle programs based on scons next # =============================================================== # if does_this_file_exist?(FILE_SCONS) and !meson_build_file_exists? if depends_on and depends_on_python? use_this_build_system = 'scons' else use_this_build_system = 'scons' end end end end } if use_this_build_system.nil? # =================================================================== # # If it is still nil then we try some other checks. # =================================================================== # # === Check for a rubygem file: # =================================================================== # if program_path and program_path.end_with?('.gem') use_this_build_system = 'rubygem' # =================================================================== # # === Check for ninja: # =================================================================== # elsif depends_on and depends_on_ninja?(depends_on) use_this_build_system = 'ninja' # =================================================================== # # === Handle "setup.py" files next # =================================================================== # elsif does_this_file_exist?(FILE_SETUP_PY) and !meson_build_file_exists? if depends_on and depends_on_python? use_this_build_system = 'python' else use_this_build_system = 'python' end end end else if does_this_file_exist?(FILE_SETUP_PY) use_this_build_system = 'python' elsif meson_build_file_exists?(:default, use_a_build_directory) use_this_build_system = 'meson' else # This is our default then. if i.is_a? Symbol e "Unregistered symbol: #{i}" else use_this_build_system = i end end end use_this_build_system # Return our findings here. end |
.infer_these_binaries_will_be_installed_by(this_program = ARGV) ⇒ Object
#
RBT.infer_these_binaries_will_be_installed_by
This method can be used to infer the binaries that may be installed by a given program at hand. This requires that the program has been installed already under an AppDir prefix.
#
770 771 772 773 774 |
# File 'lib/rbt/cookbooks/suggest_cookbook_for.rb', line 770 def self.infer_these_binaries_will_be_installed_by( this_program = ARGV ) RBT::SuggestCookbookFor.new(this_program) { :do_not_report }.binaries? end |
.infer_these_libraries_will_be_installed_by(this_program = ARGV) ⇒ Object
#
RBT.infer_these_libraries_will_be_installed_by
This method can be used to infer the libraries that may be installed by a given program at hand. This requires that the program has been installed already under an AppDir prefix.
#
757 758 759 760 761 |
# File 'lib/rbt/cookbooks/suggest_cookbook_for.rb', line 757 def self.infer_these_libraries_will_be_installed_by( this_program = ARGV ) RBT::SuggestCookbookFor.new(this_program) { :do_not_report }.libraries? end |
.initialize_configuration ⇒ Object
#
RBT.initialize_configuration
Use a method to initialize the configuration for the RBT project.
#
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 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 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 |
# File 'lib/rbt/configuration/initialize_configuration.rb', line 31 def self.initialize_configuration # ======================================================================= # # We will set the @configuration variable to a specific value here. # ======================================================================= # RBT.set_configuration( # ===================================================================== # # Load up the data from the directory. This requires the file called # 'configuration_directory.rb'. # ===================================================================== # configuration_directory? # <- This is a String such as "/Programs/Ruby/2.5.1/lib/ruby/site_ruby/2.5.0/rbt/yaml/configuration/" ) # ======================================================================= # # === enable_gobolinux_config # # Use a specific "template" when we are on a GoboLinux distribution. # # Do also note that in the more recent GoboLinux versions, say past # the year 2017, the directories have changed a bit. The following # code will ONLY honour the current versions, not the older legacy # GoboLinux versions. # ======================================================================= # if @configuration.respond_to?(:enable_gobolinux_config) and @configuration.enable_gobolinux_config RBT.set_system_directory('/System/') # === SYSTEM_DIR @system_index_directory = "#{SYSTEM_DIR}Index/" RBT.set_source_directory('/Files/Compile/Source/') # /Files/Compile/Archives/ RBT.set_programs_directory('/Programs/') # Hardcoded, on GoboLinux. RBT.set_temp_directory(SYSTEM_DIR+'Variable/tmp/') # CONFIG.temp_dir RBT.set_depot_directory('/Depot/') @system_links_directory = "#{SYSTEM_DIR}Links/" RBT.set_packages_directory("#{DEPOT_DIR}Packages/") # This is not a Gobolinux Directory, though. @pkgconfig_directory = "#{SYSTEM_LINKS_DIR}Libraries/pkgconfig/" RBT.set_sysbin_directory("#{SYSTEM_INDEX}bin/") RBT.set_syslib_directory("#{SYSTEM_INDEX}lib/") RBT.set_sysinclude_directory("#{SYSTEM_INDEX}include/") RBT.set_system_settings_directory("#{SYSTEM_DIR}Settings/") RBT.set_system_share_directory("#{SYSTEM_LINKS_DIR}Shared/") @system_libexec_directory = "#{SYSTEM_INDEX}libexec/" @system_environment_directory = "#{SYSTEM_LINKS_DIR}Environment/" @system_tasks_directory = "#{SYSTEM_LINKS_DIR}Tasks/" @system_logs_directory = "#{SYSTEM_DIR}Logs/" @system_kernel_directory = "#{SYSTEM_DIR}Kernel/" else # ================================================================== # # Else, we will set the default variables here via the CONFIG # object. Keep a trailing / here. # ===================================================================== # # Keep a reference to the TEMP Directory used by the RBT Scripts here. # We will extract archives into this directory (the temp directory). # Before we will assign to the constant, we first have to do some # sanitizing. # ===================================================================== # _ = rds( @configuration.temp_directory ) if _.include? '#' # Chop off in this case. _ = _[0, _.index('#')].strip _ << '/' unless _.end_with? '/' end # ===================================================================== # # _ may be "/Depot/Temp/rbt/". # ===================================================================== # RBT.set_temp_directory(_) # ===================================================================== # # Keep a reference to the Programs dir. # ===================================================================== # RBT.set_programs_directory(@configuration.programs_directory) # ===================================================================== # # === The source directory # ===================================================================== # RBT.set_source_directory(@configuration.source_directory) # Where to store all Source files. # ===================================================================== # # === The /System/ directory # ===================================================================== # RBT.set_system_directory(@configuration.system_directory) # '/System/' RBT.set_sysbin_directory(@configuration.sysbin_directory) # Standard sysbin directory. RBT.set_syslib_directory(@configuration.syslib_directory) # Standard syslib directory. RBT.set_sysinclude_directory(@configuration.sysinclude_dir) # Standard include directory. # SYSLIB_DIR+'/pkgconfig/' # including pkgconfig RBT.set_depot_directory(@configuration.depot_dir) @system_logs_directory = rds(@configuration.system_logs+'/') # SYSTEM_DIR+'Logs' # Where to keep our syslogs. RBT.set_log_directory # Default it to some value. # ===================================================================== # # === SYSTEM_SETTINGS_DIR # # Where to keep the /etc equivalent. # ===================================================================== # RBT.set_system_settings_directory(@configuration.system_settings_dir) # ===================================================================== # # === The Packages Dir # # On my system it is at /Depot/Packages. # ===================================================================== # RBT.set_packages_directory(@configuration.packages_directory) # ===================================================================== # # === MY_SYSSHARE # # Next, handle the SYSSHARE_DIR directory. # ===================================================================== # if ENV['MY_SYSSHARE'] RBT.set_system_share_directory(ENV['MY_SYSSHARE'].dup) else RBT.set_system_share_directory(@configuration.sysshare_directory) end # ===================================================================== # # === PKGCONFIG_DIR # # PKGCONFIG_DIR is hardcoded for now. # ===================================================================== # @pkgconfig_directory = rds(@configuration.pkgconfig_dir+'/') end end |
.install_libstdc_plus_plus(shall_we_extract_the_tarball = true, use_this_gcc_version = '10.1.0', to = RBT.log_dir?, use_this_as_target_prefix = RBT.programs_directory?) ⇒ Object
#
RBT.install_libstdc_plus_plus
The following code was taken/adapted from:
http://www.linuxfromscratch.org/lfs/view/stable/chapter05/gcc-libstdc++.html
#
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/rbt/toplevel_methods/install_libstdc_plus_plus.rb', line 24 def self.install_libstdc_plus_plus( shall_we_extract_the_tarball = true, # ← We could skip it, too. use_this_gcc_version = '10.1.0', to = RBT.log_dir?, use_this_as_target_prefix = RBT.programs_directory? ) what = "/home/x/src/gcc/gcc-#{use_this_gcc_version}.tar.xz" if shall_we_extract_the_tarball Extracter.what_to(what, to) end cd("#{to}#{use_this_gcc_version}/") use_this_as_host = 'x86_64-linux-gnu' target_dir = 'BUILD_FOR_LIBSTDC++' mkdir target_dir cd target_dir use_this_full_prefix_target = use_this_as_target_prefix+'Libstdc++/'+use_this_gcc_version _ = '../libstdc++-v3/configure \ --host='+use_this_as_host+' \ --prefix='+use_this_full_prefix_target+' \ --disable-multilib \ --disable-nls \ --disable-libstdcxx-threads \ --disable-libstdcxx-pch \ --with-gxx-include-dir='+use_this_as_target_prefix+'Gcc/Current/include/c++/'+use_this_gcc_version esystem _ esystem 'make' esystem 'make install' require 'rbt/utility_scripts/to_current.rb' RBT::ToCurrent.new(use_this_full_prefix_target) end |
.install_this_rubygem(i) ⇒ Object
#
RBT.install_this_rubygem
#
255 256 257 258 259 260 |
# File 'lib/rbt/compile/ruby.rb', line 255 def self.install_this_rubygem(i) compile_object = RBT::Compile.new(:do_not_run_yet) compile_object.determine_the_dataset_for_this_program(i) compile_object.set_program_path(compile_object.cookbook_dataset_program_path?) compile_object.install_this_ruby_gem(:default, :do_not_exit) end |
.is_an_abbreviation?(i) ⇒ Boolean
330 331 332 |
# File 'lib/rbt/toplevel_methods/available_programs.rb', line 330 def self.is_an_abbreviation?(i) RBT.hash_aliases_to_the_available_programs?.has_key? i end |
.is_an_alias?(i) ⇒ Boolean
322 323 324 |
# File 'lib/rbt/aliases/aliases.rb', line 322 def self.is_an_alias?(i) RBT::Cookbooks::Aliases.new(i).is_an_alias? end |
.is_an_archive?(i) ⇒ Boolean
#
RBT.is_an_archive?
This method will return true if the given input is considered to be an archive; and false otherwise.
#
17 18 19 20 21 |
# File 'lib/rbt/toplevel_methods/archive_type.rb', line 17 def self.is_an_archive?(i) ARRAY_REGISTERED_ARCHIVES.any? {|entry| i.end_with? entry } end |
.is_included?(i, honour_aliases = true) ⇒ Boolean
#
RBT.is_included?
This method can be used to query whether a given input is included or whether it is not - that is, if the input may be a program that is registered in the RBT project.
By default we will also include aliases, but this can be disabled, such as by using the Symbol :do_not_check_for_aliases as the second argument to this method.
Remember that all aliases in use are stored in a yaml file. If you want to add new aliases or change the existing ones, you may have to modify that yaml file.
In principle, we could also restrict this method here to only-aliases but I found that the API reads differently than this intent.
Usage examples for this method:
RBT.is_included? 'abiword' # => true
RBT.is_included? 'aclocal'
#
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/rbt/toplevel_methods/is_included.rb', line 35 def self.is_included?( i, honour_aliases = true ) if i i = i.join(' ').strip if i.is_a? Array # ===================================================================== # # We need a String past this point. # ===================================================================== # i = i.to_s unless i.is_a? String i.delete!(':') if i.include? ':' # We ignore ':' tokens. keys = available_programs? case honour_aliases when :default # Restore the default state in this case. honour_aliases = true when :do_not_honour_aliases, :do_not_check_for_aliases, :do_not_use_aliases, :ignore_aliases, :user_disabled_this_setting_via_the_commandline honour_aliases = false end if honour_aliases aliases = RBT::Cookbooks::Aliases.new(i) all_aliases = aliases.dataset # =================================================================== # # Merge the keys together next, starting with the default programs. # ==================================================================== # keys << all_aliases.keys end keys.flatten! return keys.include?(i) else false end end |
.is_on_64_bit? ⇒ Boolean
#
RBT.is_on_64_bit?
#
41 42 43 |
# File 'lib/rbt/toplevel_methods/determine_host_architecture.rb', line 41 def self.is_on_64_bit? determine_host_architecture.include? '64' end |
.is_on_windows? ⇒ Boolean
#
RBT.is_on_windows?
This method will return true if we are on windows; and false otherwise.
#
14 15 16 17 |
# File 'lib/rbt/toplevel_methods/is_on_windows.rb', line 14 def self.is_on_windows? return true if RUBY_PLATFORM.include? 'win' return false end |
.is_roebe? ⇒ Boolean
#
RBT.is_roebe?
This method is only useful on my home system, where the environment variable IS_ROEBE has been set to 1.
#
15 16 17 |
# File 'lib/rbt/toplevel_methods/roebe.rb', line 15 def self.is_roebe? "#{ENV['IS_ROEBE']}" == '1' end |
.is_this_a_real_gobolinux_system? ⇒ Boolean
#
RBT.is_this_a_real_gobolinux_system?
This method queries whether we are on a real GoboLinux system.
In order to determine this, as a true or false answer, we will ONLY check on local file-paths and possibly directory-paths.
We will check for three targets.
#
22 23 24 25 26 |
# File 'lib/rbt/toplevel_methods/gobolinux.rb', line 22 def self.is_this_a_real_gobolinux_system? File.exist?('/System/Aliens') and File.exist?('/System/Kernel/Boot/System.map') and File.symlink?('/System/Kernel/Boot/System.map') end |
.is_this_a_registered_gir_file?(i = 'Gtk+-3.0.gir') ⇒ Boolean
#
RBT.is_this_a_registered_gir_file?
#
186 187 188 189 |
# File 'lib/rbt/registered/registered_gir_files.rb', line 186 def self.is_this_a_registered_gir_file?(i = 'Gtk+-3.0.gir') dataset = YAML.load_file(file_registered_gir_files) dataset.has_key?(i) end |
.is_this_a_registered_m4_file?(i = 'pkg.m4') ⇒ Boolean
#
RBT.is_this_a_registered_m4_file?
#
204 205 206 207 208 209 210 211 |
# File 'lib/rbt/registered/registered_m4_files.rb', line 204 def self.is_this_a_registered_m4_file?(i = 'pkg.m4') if File.exist? file_registered_m4_files dataset = YAML.load_file(file_registered_m4_files) dataset.has_key?(i) else false end end |
.is_this_a_registered_pkgconfig_file?(i = 'xau.pc') ⇒ Boolean
#
RBT.is_this_a_registered_pkgconfig_file?
#
209 210 211 212 213 214 215 216 |
# File 'lib/rbt/registered/registered_pkgconfig_files.rb', line 209 def self.is_this_a_registered_pkgconfig_file?(i = 'xau.pc') if File.exist? file_registered_pkgconfig_files dataset = YAML.load_file(file_registered_pkgconfig_files) dataset.has_key?(i) else false end end |
.is_this_header_included?(i) ⇒ Boolean
#
RBT.is_this_header_included?
#
241 242 243 |
# File 'lib/rbt/registered/registered_headers.rb', line 241 def self.is_this_header_included?(i) all_headers?.has_key?(i) end |
.is_this_partial_header_included?(i) ⇒ Boolean
#
RBT.is_this_partial_header_included?
#
248 249 250 251 252 253 |
# File 'lib/rbt/registered/registered_headers.rb', line 248 def self.is_this_partial_header_included?(i) result = all_headers?.transform_keys {|entry| File.basename(entry) } result.has_key?(i) end |
.is_this_program_included?(this_program, optional_argument = nil) ⇒ Boolean
#
RBT.is_this_program_included?
This method can be used to determine whether the given input argument to this method is a registered program; aka whether this program is included as part of the RBT project. A boolean will thus be returned, true indicating inclusion, and false indicating that the input is NOT a registered program.
Any input that is assumed to be a program, and included (thus returning true via this method), is additionally assumed to have an associated .yml dataset that describes how this program can be installed.
If the second argument is given, and is the Symbol :include_abbreviations or :with_abbreviations, or any similar symbol, then the abbreviations will also be considered.
Usage examples:
RBT.is_this_program_included? 'gawk'
RBT.is_this_program_included? 'awk'
#
277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 |
# File 'lib/rbt/toplevel_methods/available_programs.rb', line 277 def self.is_this_program_included?( this_program, optional_argument = nil # <- Can be :include_abbreviations ) result = RBT.determine_available_programs.include?(this_program) case optional_argument # ======================================================================= # # === :do_not_check_for_aliases # ======================================================================= # when :do_not_check_for_aliases # This clause will not check for aliases. # ======================================================================= # # === :include_abbreviations # # This is the default value - see the symbol :default. # ======================================================================= # when :include_abbreviations, :with_abbreviations, :with_aliases, :default # ===================================================================== # # Keep a reference to the Hash that stores the aliases to the # available programs at hand. # ===================================================================== # abbreviations = RBT.hash_aliases_to_the_available_programs if abbreviations.has_key? this_program result = true end end result end |
.last_update? ⇒ Boolean
#
RBT.last_update?
#
52 53 54 |
# File 'lib/rbt/version/version.rb', line 52 def self.last_update? LAST_UPDATE end |
.libtool(i = ARGV) ⇒ Object
#
RBT.libtool
Easier module-level method towards Libtool.
#
163 164 165 |
# File 'lib/rbt/libtool/misc.rb', line 163 def self.libtool(i = ARGV) RBT::Libtool.new(i) end |
.lightblue(i) ⇒ Object
#
RBT.lightblue
#
28 29 30 31 |
# File 'lib/rbt/colours/html_colours.rb', line 28 def self.lightblue(i) return COLOURS.lightblue(i) if use_colours? i end |
.lightgreen(i = '') ⇒ Object
#
RBT.lightgreen
#
116 117 118 119 |
# File 'lib/rbt/colours/html_colours.rb', line 116 def self.lightgreen(i = '') return COLOURS.lightgreen(i) if use_colours? i end |
.lightsalmon(i = '') ⇒ Object
#
RBT.lightsalmon
#
68 69 70 71 |
# File 'lib/rbt/colours/html_colours.rb', line 68 def self.lightsalmon(i = '') return COLOURS.lightsalmon(i) if use_colours? i end |
.load_yaml(i) ⇒ Object
#
RBT.load_yaml
You may use this method when loading a yaml file in the RBT project.
#
66 67 68 |
# File 'lib/rbt/requires/require_yaml.rb', line 66 def self.load_yaml(i) YAML.load_file(i) end |
.log_directory? ⇒ Boolean
#
RBT.log_directory?
Query method for the @log_directory variable. Prefer to use this method or any of its aliases rather than the constant called LOG_DIR.
On my home system this usually defaults to “/home/Temp/rbt/”.
#
27 28 29 |
# File 'lib/rbt/toplevel_methods/log_directory.rb', line 27 def self.log_directory? @log_directory end |
.make_app_prefix(for_this_program = :infer) ⇒ Object
#
RBT.make_app_prefix
This method will ultimately execute a command such as this one here:
make PREFIX=/home/Programs/Xfce4-panel/4.14.3/ install
#
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/rbt/toplevel_methods/make_app_prefix.rb', line 22 def self.make_app_prefix( for_this_program = :infer ) begin require 'program_information' rescue LoadError; end if for_this_program.is_a? Array and for_this_program.empty? for_this_program = :default end case for_this_program # ======================================================================= # # === :infer # # This is the default entry point to this method. # ======================================================================= # when :infer, :default _ = File.basename(return_pwd) program_name = ProgramInformation.return_name(_) program_version = ProgramInformation.return_version(_) target = programs_dir?+program_name.capitalize+'/'+program_version.to_s+'/' # esystem 'make PREFIX='+target cmd_to_run = "make PREFIX=#{target} install" e esystem cmd_to_run e end end |
.map_this_input_to_that_registered_program(i = ARGV) ⇒ Object
#
RBT.map_this_input_to_that_registered_program
Usage example:
RBT.map_this_input_to_that_registered_program('mutool') # => "mupdf"
#
351 352 353 354 |
# File 'lib/rbt/misc/map_this_input_to_that_registered_program.rb', line 351 def self.map_this_input_to_that_registered_program(i = ARGV) i = i.first if i.is_a? Array RBT::MapThisInputToThatRegisteredProgram[i] end |
.mediumseagreen(i = '') ⇒ Object
#
RBT.mediumseagreen
#
132 133 134 135 |
# File 'lib/rbt/colours/html_colours.rb', line 132 def self.mediumseagreen(i = '') return COLOURS.mediumseagreen(i) if use_colours? i end |
.mediumslateblue(i) ⇒ Object
#
RBT.mediumslateblue
#
20 21 22 23 |
# File 'lib/rbt/colours/html_colours.rb', line 20 def self.mediumslateblue(i) return COLOURS.mediumslateblue(i) if use_colours? i end |
.meson_appdir_prefix(i = :use_cwd_as_input) ⇒ Object
#
RBT.meson_appdir_prefix
The argument to this method defaults to the symbol called :use_cwd_as_input, which will be translated into the current working directory.
#
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/rbt/toplevel_methods/meson.rb', line 30 def self.meson_appdir_prefix( i = :use_cwd_as_input ) case i when :use_cwd_as_input i = return_pwd end i = File.basename(i) |