rbt 0.16.12 → 0.16.14
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of rbt might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/doc/README.gen +1 -1
- data/lib/rbt/actions/actions.rb +18 -17
- data/lib/rbt/actions/individual_actions/create_app_dir_skeleton/create_app_dir_skeleton.rb +1 -1
- data/lib/rbt/actions/individual_actions/installer/aggregate.rb +28 -112
- data/lib/rbt/{utility_scripts → actions/individual_actions/show_manual_steps}/show_manual_steps.rb +12 -15
- data/lib/rbt/actions/individual_actions/software_manager/actions.rb +72 -0
- data/lib/rbt/actions/individual_actions/software_manager/extract_related_code.rb +26 -9
- data/lib/rbt/actions/individual_actions/software_manager/logic_related_code.rb +50 -73
- data/lib/rbt/actions/individual_actions/software_manager/menu.rb +154 -153
- data/lib/rbt/actions/individual_actions/software_manager/misc.rb +1390 -1865
- data/lib/rbt/actions/individual_actions/software_manager/query_related_methods.rb +121 -21
- data/lib/rbt/actions/individual_actions/software_manager/reset.rb +7 -7
- data/lib/rbt/actions/individual_actions/software_manager/setters.rb +433 -28
- data/lib/rbt/actions/individual_actions/software_manager/software_manager.rb +1 -0
- data/lib/rbt/shell/shell_script_containing_the_program_versions.sh +11420 -5
- data/lib/rbt/toplevel_methods/meson.rb +13 -11
- data/lib/rbt/version/version.rb +2 -2
- data/lib/rbt/yaml/cookbooks/exiv2.yml +1 -0
- data/lib/rbt/yaml/cookbooks/extracmakemodules.yml +1 -1
- data/lib/rbt/yaml/cookbooks/glibnetworking.yml +1 -0
- data/lib/rbt/yaml/cookbooks/kitinerary.yml +5 -0
- data/lib/rbt/yaml/cookbooks/libproxy.yml +1 -1
- data/lib/rbt/yaml/cookbooks/ncurses.yml +1 -2
- data/lib/rbt/yaml/cookbooks/wordpress.yml +4 -2
- data/lib/rbt/yaml/expanded_cookbooks/cbindgen.yml +16 -13
- data/lib/rbt/yaml/expanded_cookbooks/erlang.yml +1 -1
- data/lib/rbt/yaml/expanded_cookbooks/exiv2.yml +1 -1
- data/lib/rbt/yaml/expanded_cookbooks/extracmakemodules.yml +1 -1
- data/lib/rbt/yaml/expanded_cookbooks/gdkpixbuf.yml +2 -2
- data/lib/rbt/yaml/expanded_cookbooks/kitinerary.yml +3 -3
- data/lib/rbt/yaml/expanded_cookbooks/libmpeg3.yml +2 -1
- data/lib/rbt/yaml/expanded_cookbooks/libproxy.yml +1 -1
- data/lib/rbt/yaml/expanded_cookbooks/nuvie.yml +1 -1
- data/lib/rbt/yaml/expanded_cookbooks/qt.yml +5 -5
- data/lib/rbt/yaml/expanded_cookbooks/sendmail.yml +14 -7
- data/lib/rbt/yaml/expanded_cookbooks/sharutils.yml +1 -1
- data/lib/rbt/yaml/expanded_cookbooks/squashfstools.yml +3 -3
- data/lib/rbt/yaml/expanded_cookbooks/wordpress.yml +10 -10
- data/lib/rbt/yaml/programs_version/available_programs_versions.md +3 -3
- data/lib/rbt/yaml/programs_version/the_expanded_coobkook_dataset_was_last_updated_on_this_day.yml +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6d68b8e42329fbaeddd1975b0517ed3c6536d129e16d03ef1fbb05de575fa70f
|
4
|
+
data.tar.gz: b0d4756fca9cb94a742b298c70e4bc94b5ec8b02667e6ea4752ee84ecf725bfa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7232181835ccc0e708f15f4ed072a39f39284fa7ac67a853190b2072f3ef0298c87aae3faa4082e426122d9253aee1429d07796ba9d571554101956b9d0c5667
|
7
|
+
data.tar.gz: 3160f3f569c3228bf5d42032a4028a418a4237797077e72e99b333f2938ffd8f9a776401534a882ed2680ab165a3ae39f74dc6c2636e8e0100120e4335f58273
|
data/README.md
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
[](https://www.ruby-lang.org/en/)
|
6
6
|
[](https://badge.fury.io/rb/rbt)
|
7
7
|
|
8
|
-
This gem was <b>last updated</b> on the <span style="color: darkblue; font-weight: bold">
|
8
|
+
This gem was <b>last updated</b> on the <span style="color: darkblue; font-weight: bold">03.04.2024</span> (dd.mm.yyyy notation), at <span style="color: steelblue; font-weight: bold">06:07:40</span> o'clock.
|
9
9
|
|
10
10
|
## Introduction to the "Ruby Build Tools" Project (RBT)
|
11
11
|
|
@@ -110,7 +110,7 @@ long run.
|
|
110
110
|
|
111
111
|
Let us now briefly explain how RBT approaches compiling from a source
|
112
112
|
archive: after all that is <b>the main goal for the</b>
|
113
|
-
<span style="color: darkgreen; font-weight: bold">RBT project
|
113
|
+
<span style="color: darkgreen; font-weight: bold">RBT project</span></b>.
|
114
114
|
|
115
115
|
Let's take any random remote URL to some tarball archive,
|
116
116
|
such as the <b>.tar.xz file</b> for <b>evince</b> that may
|
data/doc/README.gen
CHANGED
@@ -106,7 +106,7 @@ long run.
|
|
106
106
|
|
107
107
|
Let us now briefly explain how RBT approaches compiling from a source
|
108
108
|
archive: after all that is <b>the main goal for the</b>
|
109
|
-
<span style="color: darkgreen; font-weight: bold">RBT project
|
109
|
+
<span style="color: darkgreen; font-weight: bold">RBT project</span></b>.
|
110
110
|
|
111
111
|
Let's take any random remote URL to some tarball archive,
|
112
112
|
such as the <b>.tar.xz file</b> for <b>evince</b> that may
|
data/lib/rbt/actions/actions.rb
CHANGED
@@ -39,6 +39,24 @@ module RBT
|
|
39
39
|
# ======================================================================= #
|
40
40
|
case action_that_is_desired # (case tag)
|
41
41
|
# ======================================================================= #
|
42
|
+
# === :show_manual_steps
|
43
|
+
#
|
44
|
+
# Commandline usage example:
|
45
|
+
#
|
46
|
+
# raction show_manual_steps glibc
|
47
|
+
#
|
48
|
+
# ======================================================================= #
|
49
|
+
when :show_manual_steps,
|
50
|
+
:ShowManualSteps
|
51
|
+
require 'rbt/actions/individual_actions/show_manual_steps/show_manual_steps.rb'
|
52
|
+
RBT.show_manual_steps(_)
|
53
|
+
# ======================================================================= #
|
54
|
+
# === :run_meson_configure_step
|
55
|
+
# ======================================================================= #
|
56
|
+
when :run_meson_configure_step
|
57
|
+
require 'rbt/toplevel_methods/meson.rb'
|
58
|
+
return RBT.run_meson_configure_step(_, &block)
|
59
|
+
# ======================================================================= #
|
42
60
|
# === :prefix_object
|
43
61
|
# ======================================================================= #
|
44
62
|
when :prefix_object,
|
@@ -186,12 +204,6 @@ module RBT
|
|
186
204
|
require 'rbt/toplevel_methods/toplevel_methods.rb'
|
187
205
|
RBT.consider_changing_the_tab_title(_, &block)
|
188
206
|
# ======================================================================= #
|
189
|
-
# === :run_meson_configure_step
|
190
|
-
# ======================================================================= #
|
191
|
-
when :run_meson_configure_step
|
192
|
-
require 'rbt/toplevel_methods/meson.rb'
|
193
|
-
return RBT.run_meson_configure_step(_, &block)
|
194
|
-
# ======================================================================= #
|
195
207
|
# === :cmake
|
196
208
|
# ======================================================================= #
|
197
209
|
when :cmake,
|
@@ -769,17 +781,6 @@ module RBT
|
|
769
781
|
require 'rbt/utility_scripts/remove_empty_directories.rb'
|
770
782
|
RBT.remove_empty_directories(_)
|
771
783
|
# ======================================================================= #
|
772
|
-
# === :show_manual_steps
|
773
|
-
#
|
774
|
-
# Commandline usage example:
|
775
|
-
#
|
776
|
-
# raction show_manual_steps glibc
|
777
|
-
#
|
778
|
-
# ======================================================================= #
|
779
|
-
when :show_manual_steps
|
780
|
-
require 'rbt/utility_scripts/show_manual_steps.rb'
|
781
|
-
RBT.show_manual_steps(_)
|
782
|
-
# ======================================================================= #
|
783
784
|
# === :chain_compile
|
784
785
|
#
|
785
786
|
# Invocation example:
|
@@ -494,7 +494,7 @@ class CreateAppDirSkeleton < RBT::Action # === RBT::Action::CreateAppDirSkeleton
|
|
494
494
|
def notify_the_user_what_will_be_done
|
495
495
|
opnn; ee sfancy(return_program_name_and_program_version.downcase)
|
496
496
|
if be_verbose?
|
497
|
-
ee " #{rev}(#{simp('Program name')}: #{sfancy(program_name?)}"\
|
497
|
+
ee " #{rev}(#{simp('Program name')}#{rev}: #{sfancy(program_name?)}"\
|
498
498
|
"#{rev} and #{simp('Program Version')}#{rev}: "\
|
499
499
|
"#{sfancy(program_version?)}#{rev})"
|
500
500
|
end
|
@@ -1,5 +1,33 @@
|
|
1
1
|
class OBSOLETE
|
2
2
|
|
3
|
+
def invoke_extracter
|
4
|
+
# ===================================================================== #
|
5
|
+
# Remove the extracted directory if it exists next. This will,
|
6
|
+
# however had, NOT be done if we extract to another target
|
7
|
+
# directory, such as when issuing a command like
|
8
|
+
# "ry htop --extract-to=/opt/test".
|
9
|
+
#^^^^ this must be ported still.
|
10
|
+
# ===================================================================== #
|
11
|
+
# possibly_existing_old_extracted_archive = cookbooks_dataset_extracted_towards?
|
12
|
+
# unless possibly_existing_old_extracted_archive.include? extract_to?
|
13
|
+
|
14
|
+
# =================================================================== #
|
15
|
+
# In this case we reasonably assume that the user has NOT given a
|
16
|
+
# --extract-to value.
|
17
|
+
#
|
18
|
+
# Keep in mind that the user may specify another temp-directory,
|
19
|
+
# which explains the check for user-input.
|
20
|
+
# =================================================================== #
|
21
|
+
if cookbooks_for? and !keep_the_old_directory_if_it_exists
|
22
|
+
_ = will_be_extracted_towards?
|
23
|
+
if @internal_hash.has_key?(:extract_to_this_directory_as_specified_by_the_user) and
|
24
|
+
@internal_hash[:extract_to_this_directory_as_specified_by_the_user]
|
25
|
+
_ = @internal_hash[:extract_to_this_directory_as_specified_by_the_user]
|
26
|
+
end
|
27
|
+
# end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
3
31
|
# ========================================================================= #
|
4
32
|
# === run_system_or_ioparser_command (iopen tag)
|
5
33
|
#
|
@@ -363,7 +391,6 @@ class OBSOLETE
|
|
363
391
|
alias determine_which_programs_to_compile set_install_these_programs # === determine_which_programs_to_compile
|
364
392
|
alias set_work_on_this_program set_install_these_programs # === set_work_on_this_program
|
365
393
|
|
366
|
-
|
367
394
|
# ========================================================================= #
|
368
395
|
# === parse_this_line_obtained_via_io_popen (io-open tag, sys tag)
|
369
396
|
#
|
@@ -627,115 +654,4 @@ class OBSOLETE
|
|
627
654
|
end; alias run_make_command run_make # === run_make_command
|
628
655
|
alias considering_running_make_command_via_system run_make # === considering_running_make_command_via_system
|
629
656
|
|
630
|
-
# ========================================================================= #
|
631
|
-
# === invoke_extracter
|
632
|
-
#
|
633
|
-
# Delegate towards class Extracter next.
|
634
|
-
# ========================================================================= #
|
635
|
-
def invoke_extracter(
|
636
|
-
i = program_path?,
|
637
|
-
extract_to_this_directory = extract_where_to?,
|
638
|
-
keep_the_old_directory_if_it_exists = false
|
639
|
-
)
|
640
|
-
|
641
|
-
case extract_to_this_directory
|
642
|
-
when nil
|
643
|
-
extract_to_this_directory = will_be_extracted_towards?
|
644
|
-
@internal_hash[:extract_to_this_directory_as_specified_by_the_user] =
|
645
|
-
extract_to_this_directory
|
646
|
-
set_extract_to_this_directory(extract_to_this_directory)
|
647
|
-
end
|
648
|
-
yielded = nil
|
649
|
-
case keep_the_old_directory_if_it_exists # case tag.
|
650
|
-
# ======================================================================= #
|
651
|
-
# === :do_keep_the_old_directory_if_it_exists,
|
652
|
-
# ======================================================================= #
|
653
|
-
when :do_keep_the_old_directory_if_it_exists,
|
654
|
-
:keep_the_old_directory_if_it_exists
|
655
|
-
keep_the_old_directory_if_it_exists = true
|
656
|
-
end
|
657
|
-
# ======================================================================= #
|
658
|
-
# === Handle blocks given to this method next:
|
659
|
-
# ======================================================================= #
|
660
|
-
if block_given?
|
661
|
-
yielded = yield
|
662
|
-
case yielded
|
663
|
-
# ===================================================================== #
|
664
|
-
# === :keep_the_old_directory_if_it_exists
|
665
|
-
# ===================================================================== #
|
666
|
-
when :keep_the_old_directory_if_it_exists
|
667
|
-
keep_the_old_directory_if_it_exists = true
|
668
|
-
else
|
669
|
-
# =================================================================== #
|
670
|
-
# === Handle Hashes next
|
671
|
-
# =================================================================== #
|
672
|
-
if yielded.is_a? Hash
|
673
|
-
# ================================================================= #
|
674
|
-
# === :append_to_the_commandline
|
675
|
-
# ================================================================= #
|
676
|
-
if yielded.has_key? :append_to_the_commandline
|
677
|
-
append_to_the_commandline << yielded[:append_to_the_commandline]
|
678
|
-
end
|
679
|
-
end
|
680
|
-
end
|
681
|
-
end
|
682
|
-
unless skip_extracting?
|
683
|
-
case extract_to_this_directory
|
684
|
-
# ===================================================================== #
|
685
|
-
# === :default
|
686
|
-
# ===================================================================== #
|
687
|
-
when :default
|
688
|
-
extract_to_this_directory = will_be_extracted_towards?
|
689
|
-
end
|
690
|
-
# ===================================================================== #
|
691
|
-
# Remove the extracted directory if it exists next. This will,
|
692
|
-
# however had, NOT be done if we extract to another target
|
693
|
-
# directory, such as when issuing a command like
|
694
|
-
# "ry htop --extract-to=/opt/test".
|
695
|
-
# ===================================================================== #
|
696
|
-
# possibly_existing_old_extracted_archive = cookbooks_dataset_extracted_towards?
|
697
|
-
# unless possibly_existing_old_extracted_archive.include? extract_to?
|
698
|
-
# =================================================================== #
|
699
|
-
# In this case we reasonably assume that the user has NOT given a
|
700
|
-
# --extract-to value.
|
701
|
-
#
|
702
|
-
# Keep in mind that the user may specify another temp-directory,
|
703
|
-
# which explains the check for user-input.
|
704
|
-
# =================================================================== #
|
705
|
-
if cookbooks_for? and !keep_the_old_directory_if_it_exists
|
706
|
-
_ = will_be_extracted_towards?
|
707
|
-
if @internal_hash.has_key?(:extract_to_this_directory_as_specified_by_the_user) and
|
708
|
-
@internal_hash[:extract_to_this_directory_as_specified_by_the_user]
|
709
|
-
_ = @internal_hash[:extract_to_this_directory_as_specified_by_the_user]
|
710
|
-
end
|
711
|
-
unless (_.squeeze('/').strip == '/') # Prevent erroneous removal of /.
|
712
|
-
if File.directory?(_)
|
713
|
-
_ = _.dup if _.frozen?
|
714
|
-
if (_ == rbt_log_dir?)
|
715
|
-
opnerror 'A problem was encountered, but this should never happen.'
|
716
|
-
opnerror 'RBT::Action::SoftwareManager tried to remove the base directory at '+
|
717
|
-
sdir(rbt_log_dir?)
|
718
|
-
opnerror 'which was the same as the passed directory `'+sdir(_)+'`.'
|
719
|
-
e
|
720
|
-
opnerror 'Something must be wrong in the information-chain, such as a'
|
721
|
-
opnerror 'faulty .yml file. Please review the information shown above'
|
722
|
-
opnerror 'and make sure that the used .yml file is correct.'
|
723
|
-
e
|
724
|
-
exit_program { :exit_no_matter_what }
|
725
|
-
else
|
726
|
-
_.strip!
|
727
|
-
_.squeeze!('/')
|
728
|
-
# =========================================================== #
|
729
|
-
# Notify the user that we will remove the old directory next.
|
730
|
-
# =========================================================== #
|
731
|
-
notify_the_user_that_this_old_directory_will_be_removed_next(_)
|
732
|
-
remove_directory(_)
|
733
|
-
end
|
734
|
-
end
|
735
|
-
end
|
736
|
-
end
|
737
|
-
# end
|
738
|
-
end
|
739
|
-
end
|
740
|
-
|
741
657
|
end
|
data/lib/rbt/{utility_scripts → actions/individual_actions/show_manual_steps}/show_manual_steps.rb
RENAMED
@@ -2,27 +2,24 @@
|
|
2
2
|
# Encoding: UTF-8
|
3
3
|
# frozen_string_literal: true
|
4
4
|
# =========================================================================== #
|
5
|
-
# === RBT::ShowManualSteps
|
5
|
+
# === RBT::Action::ShowManualSteps
|
6
6
|
#
|
7
7
|
# This small class will simply show the manual steps of a given program.
|
8
8
|
#
|
9
9
|
# In order for this to work, there has to be a manual_steps: entry in
|
10
10
|
# the corresponding .yml file.
|
11
|
-
#
|
12
|
-
# Usage example:
|
13
|
-
#
|
14
|
-
# RBT::ShowManualSteps.new(ARGV)
|
15
|
-
#
|
16
11
|
# =========================================================================== #
|
17
|
-
# require 'rbt/
|
18
|
-
# RBT::ShowManualSteps.new(ARGV)
|
19
|
-
# RBT.show_manual_steps
|
12
|
+
# require 'rbt/actions/individual_actions/show_manual_steps/show_manual_steps.rb'
|
13
|
+
# RBT::Action::ShowManualSteps.new(ARGV)
|
14
|
+
# RBT.show_manual_steps(ARGV)
|
20
15
|
# =========================================================================== #
|
21
|
-
require 'rbt/
|
16
|
+
require 'rbt/actions/action.rb'
|
22
17
|
|
23
18
|
module RBT
|
24
19
|
|
25
|
-
class
|
20
|
+
class Action
|
21
|
+
|
22
|
+
class ShowManualSteps < RBT::Action # === RBT::Action::ShowManualSteps
|
26
23
|
|
27
24
|
require 'rbt/requires/require_the_cookbook_class.rb'
|
28
25
|
|
@@ -92,7 +89,7 @@ class ShowManualSteps < Base # === RBT::ShowManualSteps
|
|
92
89
|
new(i)
|
93
90
|
end; self.instance_eval { alias [] of } # === ShowManualSteps[]
|
94
91
|
|
95
|
-
end
|
92
|
+
end; end
|
96
93
|
|
97
94
|
# =========================================================================== #
|
98
95
|
# === RBT.show_manual_steps
|
@@ -102,14 +99,14 @@ end
|
|
102
99
|
# RBT.show_manual_steps(:kde5_plasma)
|
103
100
|
#
|
104
101
|
# =========================================================================== #
|
105
|
-
def self.show_manual_steps(of = ARGV)
|
102
|
+
def self.show_manual_steps(of = ARGV, &block)
|
106
103
|
[of].flatten.compact.each {|this_program|
|
107
|
-
RBT::ShowManualSteps.new(this_program)
|
104
|
+
RBT::ShowManualSteps.new(this_program, &block)
|
108
105
|
}
|
109
106
|
end
|
110
107
|
|
111
108
|
end
|
112
109
|
|
113
110
|
if __FILE__ == $PROGRAM_NAME
|
114
|
-
RBT
|
111
|
+
RBT.show_manual_steps(ARGV)
|
115
112
|
end # showmanualsteps glibc
|
@@ -0,0 +1,72 @@
|
|
1
|
+
#!/usr/bin/ruby -w
|
2
|
+
# Encoding: UTF-8
|
3
|
+
# frozen_string_literal: true
|
4
|
+
# =========================================================================== #
|
5
|
+
# require 'rbt/actions/individual_actions/software_manager/actions.rb'
|
6
|
+
# =========================================================================== #
|
7
|
+
require 'rbt/actions/action.rb'
|
8
|
+
|
9
|
+
module RBT
|
10
|
+
|
11
|
+
class Action
|
12
|
+
|
13
|
+
class SoftwareManager < RBT::Action # === RBT::Action::SoftwareManager
|
14
|
+
|
15
|
+
# ========================================================================= #
|
16
|
+
# === action_generate_a_big_shell_script
|
17
|
+
# ========================================================================= #
|
18
|
+
def action_generate_a_big_shell_script
|
19
|
+
action(:generate_a_big_shell_script)
|
20
|
+
end
|
21
|
+
|
22
|
+
# ========================================================================= #
|
23
|
+
# === return_xfce_components
|
24
|
+
# ========================================================================= #
|
25
|
+
def return_xfce_components
|
26
|
+
action(:return_xfce_components)
|
27
|
+
end
|
28
|
+
|
29
|
+
# ========================================================================= #
|
30
|
+
# === generate_shell_completion
|
31
|
+
#
|
32
|
+
# Generates shell completion code. Right now it will only work for Bash.
|
33
|
+
#
|
34
|
+
# Invocation example:
|
35
|
+
#
|
36
|
+
# ry --generate_shell_completion
|
37
|
+
#
|
38
|
+
# ========================================================================= #
|
39
|
+
def generate_shell_completion(
|
40
|
+
for_this_shell = :all
|
41
|
+
)
|
42
|
+
action(:GenerateShellCompletion, for_this_shell)
|
43
|
+
end
|
44
|
+
|
45
|
+
# ========================================================================= #
|
46
|
+
# === show_the_n_last_updated_programs
|
47
|
+
# ========================================================================= #
|
48
|
+
def show_the_n_last_updated_programs(
|
49
|
+
i = 875
|
50
|
+
)
|
51
|
+
action(:ShowLastUpdated, display_n_programs: i)
|
52
|
+
end
|
53
|
+
|
54
|
+
# ========================================================================= #
|
55
|
+
# === backup_program
|
56
|
+
#
|
57
|
+
# Backup an existingp rogram under the /Programs/ hierarchy.
|
58
|
+
# ========================================================================= #
|
59
|
+
def backup_program(
|
60
|
+
i = compile_which_program?
|
61
|
+
)
|
62
|
+
action(:backup_program, i)
|
63
|
+
end
|
64
|
+
|
65
|
+
# ========================================================================= #
|
66
|
+
# === create_programs_url_file
|
67
|
+
# ========================================================================= #
|
68
|
+
def create_programs_url_file
|
69
|
+
action(__method__.to_sym)
|
70
|
+
end
|
71
|
+
|
72
|
+
end; end; end
|
@@ -24,10 +24,27 @@ class SoftwareManager < RBT::Action # === RBT::Action::SoftwareManager
|
|
24
24
|
def extract_what_to(
|
25
25
|
local_path = cookbook_dataset_program_path?,
|
26
26
|
extract_to_this_directory = extract_where_to?,
|
27
|
-
shall_we_report_to_the_user_if_the_archive_does_not_exist = true # This should come last.
|
27
|
+
shall_we_report_to_the_user_if_the_archive_does_not_exist = true, # This should come last.
|
28
|
+
&block
|
28
29
|
)
|
29
30
|
append_to_the_commandline = ''.dup
|
30
31
|
# ======================================================================== #
|
32
|
+
# === Handle blocks next
|
33
|
+
# ======================================================================== #
|
34
|
+
if block_given?
|
35
|
+
# ====================================================================== #
|
36
|
+
# === Handle Hashes next
|
37
|
+
# ====================================================================== #
|
38
|
+
if yielded.is_a? Hash
|
39
|
+
# ==================================================================== #
|
40
|
+
# === :append_to_the_commandline
|
41
|
+
# ==================================================================== #
|
42
|
+
if yielded.has_key? :append_to_the_commandline
|
43
|
+
append_to_the_commandline << yielded[:append_to_the_commandline]
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
# ======================================================================== #
|
31
48
|
# === Handle Hashes next
|
32
49
|
# ======================================================================== #
|
33
50
|
if local_path.is_a? Hash
|
@@ -41,9 +58,9 @@ class SoftwareManager < RBT::Action # === RBT::Action::SoftwareManager
|
|
41
58
|
local_path = local_path.to_s # Past this point we need a String.
|
42
59
|
if local_path and File.exist?(local_path)
|
43
60
|
if run_simulation?
|
44
|
-
#
|
61
|
+
# ====================================================================== #
|
45
62
|
# Here we are in simulation-mode:
|
46
|
-
#
|
63
|
+
# ====================================================================== #
|
47
64
|
orev "We would normally extract `#{sfile(local_path)}#{rev}` "\
|
48
65
|
"to #{sdir(extract_to_this_directory)} #{rev}next,"
|
49
66
|
orev 'but since we run in simulation-mode, we will not '\
|
@@ -53,12 +70,12 @@ class SoftwareManager < RBT::Action # === RBT::Action::SoftwareManager
|
|
53
70
|
_ << " #{rev}(but do so silently)" unless show_output_from_the_extracter_class?
|
54
71
|
_ << '.'
|
55
72
|
orev _
|
56
|
-
#
|
73
|
+
# ====================================================================== #
|
57
74
|
# Extracting the archive next, via an action - this will be handled
|
58
75
|
# by class Extracter. The second argument is a Hash which will
|
59
76
|
# typically carry a lot of information. This is necessary because
|
60
77
|
# we want to "fine-tune" Extracter at this step.
|
61
|
-
#
|
78
|
+
# ====================================================================== #
|
62
79
|
action(:extract_what_to, local_path,
|
63
80
|
{
|
64
81
|
extract_to: extract_to_this_directory, # ← Extract to this directory.
|
@@ -71,10 +88,10 @@ class SoftwareManager < RBT::Action # === RBT::Action::SoftwareManager
|
|
71
88
|
append_this_to_the_commandline: append_to_the_commandline,
|
72
89
|
}
|
73
90
|
) { :be_quiet }
|
74
|
-
#
|
91
|
+
# ====================================================================== #
|
75
92
|
# Next we will exit if the user told us that he/she is only
|
76
93
|
# interested in extracting the program.
|
77
|
-
#
|
94
|
+
# ====================================================================== #
|
78
95
|
exit_program if extract_only?
|
79
96
|
return extract_to_this_directory # And return it too, in case downstream code needs it.
|
80
97
|
end
|
@@ -83,9 +100,9 @@ class SoftwareManager < RBT::Action # === RBT::Action::SoftwareManager
|
|
83
100
|
opne swarn('No file could be found at `')+
|
84
101
|
sfile(local_path)+swarn('` - thus,')
|
85
102
|
opne swarn('we can not extract anything.')
|
86
|
-
#
|
103
|
+
# ====================================================================== #
|
87
104
|
# Also set a specific error, so that we won't continue.
|
88
|
-
#
|
105
|
+
# ====================================================================== #
|
89
106
|
# error_is 'We can not continue. Has the archive '\
|
90
107
|
# 'been properly extracted?'
|
91
108
|
end
|