roebe 0.5.191 → 0.6.3
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of roebe might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/README.md +23 -26
- data/bin/create_my_directories +2 -2
- data/bin/{ruby_dhcpcd → dhcpcd_wrapper} +1 -1
- data/doc/README.gen +12 -0
- data/doc/core/array.md +24 -23
- data/doc/core/gem_and_gemspec.md +12 -11
- data/doc/core/misc.md +23 -20
- data/doc/statistics/statistics.md +1 -0
- data/lib/roebe/actions/actions.rb +68 -0
- data/lib/roebe/base/misc.rb +14 -1
- data/lib/roebe/browser/output_url_then_open_in_browser.rb +8 -6
- data/lib/roebe/classes/alltagsgeschichte.rb +1 -1
- data/lib/roebe/classes/at.rb +2 -2
- data/lib/roebe/classes/auto_rename_file_based_on_its_creation_date.rb +24 -12
- data/lib/roebe/classes/books/books.rb +159 -117
- data/lib/roebe/classes/books/menu.rb +8 -7
- data/lib/roebe/classes/books/sanitize_this_book_path/sanitize_this_book_path.rb +0 -1
- data/lib/roebe/classes/check_yaml.rb +15 -11
- data/lib/roebe/classes/compile_kernel.rb +3 -1
- data/lib/roebe/classes/copy_kernel_config.rb +5 -3
- data/lib/roebe/classes/create_desktop_file.rb +1 -1
- data/lib/roebe/classes/create_my_directories.rb +12 -10
- data/lib/roebe/classes/dhcpcd/{dhcpcd.rb → dhcpcd_wrapper.rb} +137 -95
- data/lib/roebe/classes/dhcpcd/kill_dhcpcd.rb +2 -2
- data/lib/roebe/classes/do_install.rb +7 -6
- data/lib/roebe/classes/done.rb +1 -1
- data/lib/roebe/classes/downcase_extension.rb +4 -4
- data/lib/roebe/classes/email.rb +44 -40
- data/lib/roebe/classes/enable.rb +1 -1
- data/lib/roebe/classes/github.rb +1 -1
- data/lib/roebe/classes/kde/install_this_konsole_theme.rb +1 -1
- data/lib/roebe/classes/make_gem.rb +29 -27
- data/lib/roebe/classes/readme_generator/readme_generator.rb +597 -1
- data/lib/roebe/classes/report_how_many_files_are_in_this_directory.rb +83 -0
- data/lib/roebe/classes/set_background.rb +14 -0
- data/lib/roebe/classes/show_ten_aliases.rb +15 -3
- data/lib/roebe/classes/tales_from_the_crypt.rb +1 -1
- data/lib/roebe/classes/update.rb +2 -1
- data/lib/roebe/constants/array_install_these_gem_projects.rb +1 -1
- data/lib/roebe/constants/roebe.rb +2 -0
- data/lib/roebe/custom_methods/module.rb +16 -0
- data/lib/roebe/fonts/fonts.rb +39 -0
- data/lib/roebe/hello_world/hello_world.rb +0 -0
- data/lib/roebe/math/log10.rb +3 -3
- data/lib/roebe/math/the_collatz_problem.rb +104 -0
- data/lib/roebe/shell/shell/shell.rb +6 -6
- data/lib/roebe/shell_scripts/lfs/002_gcc_1.sh +13 -1
- data/lib/roebe/shell_scripts/lfs/003_linux_1.sh +1 -0
- data/lib/roebe/shell_scripts/lfs/007_ncurses_2.sh +4 -1
- data/lib/roebe/shell_scripts/lfs/020_xz_2.sh +5 -5
- data/lib/roebe/shell_scripts/lfs/021_binutils_2.sh +1 -0
- data/lib/roebe/shell_scripts/lfs/022_gcc_2.sh +12 -1
- data/lib/roebe/shell_scripts/lfs/025_ruby_2.sh +13 -0
- data/lib/roebe/shell_scripts/lfs/lfs_build_variables.sh +48 -8
- data/lib/roebe/toplevel_methods/to_mp3.rb +1 -1
- data/lib/roebe/version/version.rb +2 -2
- data/lib/roebe/wasm/README.md +7 -0
- data/lib/roebe/wasm/enable_simple_puts_output.rb +9 -0
- data/lib/roebe/wasm/wasm_examples.html +43 -0
- data/lib/roebe/www/RNA/RNA.cgi +42 -1
- data/lib/roebe/www/algorithms/algorithms.rb +22 -0
- data/lib/roebe/www/analytical_chemistry/content.md +3 -0
- data/lib/roebe/www/animals/animals.cgi +25 -0
- data/lib/roebe/www/bioanalytik/bioanalytik.cgi +90 -0
- data/lib/roebe/www/cellbiology/cellbiology.rb +16 -2
- data/lib/roebe/www/chemistry/S/303/244uren_Basen_und_der_pH_Wert/S/303/244uren_Basen_und_der_pH_Wert.cgi +242 -0
- data/lib/roebe/www/chemistry/chemistry.rb +10 -258
- data/lib/roebe/www/chemistry/css_rules.css +67 -0
- data/lib/roebe/www/chemistry/die_quantenzahlen/die_quantenzahlen.cgi +123 -0
- data/lib/roebe/www/chemistry/funktionelle_gruppen_in_der_chemie/funktionelle_gruppen_in_der_chemie.cgi +52 -0
- data/lib/roebe/www/erste_hilfe/erste_hilfe.cgi +212 -62
- data/lib/roebe/www/fonts/fonts.cgi +245 -0
- data/lib/roebe/www/hardware/computersysteme/computersysteme.rb +117 -102
- data/lib/roebe/www/hardware/netzteile/netzteile.cgi +94 -0
- data/lib/roebe/www/immunology/immunology.rb +101 -7
- data/lib/roebe/www/linux/antiX/antiX.rb +7 -4
- data/lib/roebe/www/linux/linux.rb +9 -11
- data/lib/roebe/www/linux/linuxmint/linuxmint.rb +33 -0
- data/lib/roebe/www/linux/slackware/slackware.rb +136 -27
- data/lib/roebe/www/lyrics/lyrics.rb +1 -1
- data/lib/roebe/www/microbiology/microbiology.rb +17 -2
- data/lib/roebe/www/mikrobielle_physiologie/mikrobielle_physiologie.cgi +1086 -2
- data/lib/roebe/www/mitochondria/mitochondria.cgi +16 -2
- data/lib/roebe/www/module_www.rb +2 -3
- data/lib/roebe/www/neurobiology/neurobiology.rb +20 -3
- data/lib/roebe/www/pdf/pdf.rb +13 -0
- data/lib/roebe/www/physics/physics.rb +20 -4
- data/lib/roebe/www/physiology/physiology.rb +5 -1
- data/lib/roebe/www/play_this_video_file/play_this_video_file.cgi +1 -1
- data/lib/roebe/www/programming_advice/programming_advice.cgi +36 -0
- data/lib/roebe/www/programming_advice/programming_advice.md +349 -0
- data/lib/roebe/www/psychologie/psychologie.rb +7 -1
- data/lib/roebe/www/science/science.rb +6 -0
- data/lib/roebe/www/sex_and_reproduction/sex_and_reproduction.cgi +18 -2
- data/lib/roebe/www/structural_biology/structural_biology.cgi +16 -0
- data/lib/roebe/www/the_cell_cycle/the_cell_cycle.cgi +27 -0
- data/lib/roebe/www/video/video.rb +1 -1
- data/lib/roebe/www/virology/virology.rb +12 -1
- data/lib/roebe/www/war_in_Ukraine_2022/war_in_Ukraine_2022.rb +26 -8
- data/lib/roebe/www/xorg/xorg.rb +3 -202
- data/lib/roebe/yaml/books/favourite_books.yml +6 -8
- data/lib/roebe/yaml/directory_structure.yml +1 -0
- metadata +26 -15
- data/lib/roebe/classes/readme_generator/constants.rb +0 -21
- data/lib/roebe/classes/readme_generator/initialize.rb +0 -38
- data/lib/roebe/classes/readme_generator/misc.rb +0 -548
- data/lib/roebe/classes/readme_generator/reset.rb +0 -28
- data/lib/roebe/classes/readme_generator/run.rb +0 -20
- data/lib/roebe/shell_scripts/lfs/lfs_variables.sh +0 -31
- data/lib/roebe/www/mikrobielle_physiologie/mikrobielle_physiologie.rb +0 -1055
- data/lib/roebe/www/programming_advice/programming_advice.yml +0 -31
@@ -2,47 +2,58 @@
|
|
2
2
|
# Encoding: UTF-8
|
3
3
|
# frozen_string_literal: true
|
4
4
|
# =========================================================================== #
|
5
|
-
# === Roebe::
|
5
|
+
# === Roebe::DhcpcdWrapper
|
6
|
+
#
|
7
|
+
# This class was added on the 14.02.2024. It replaced the old dhcpcd wrapper
|
8
|
+
# class that was confusing me before.
|
6
9
|
#
|
7
10
|
# This is the base class for all dhcpcd-related activities - a small
|
8
11
|
# wrapper over dhcpcd.
|
9
12
|
#
|
10
13
|
# Usage example:
|
11
14
|
#
|
12
|
-
# Roebe::
|
15
|
+
# Roebe::DhcpcdWrapper.new(ARGV)
|
13
16
|
#
|
14
17
|
# =========================================================================== #
|
15
|
-
# require 'roebe/classes/dhcpcd/
|
18
|
+
# require 'roebe/classes/dhcpcd/dhcpcd_wrapper.rb'
|
19
|
+
# Roebe::DhcpcdWrapper.new(ARGV)
|
16
20
|
# =========================================================================== #
|
17
21
|
require 'roebe/base/base.rb'
|
18
22
|
|
19
23
|
module Roebe
|
20
24
|
|
21
|
-
class
|
25
|
+
class DhcpcdWrapper < Base # === Roebe::DhcpcdWrapper
|
22
26
|
|
23
27
|
# ========================================================================= #
|
24
|
-
# ===
|
28
|
+
# === DIRECTORY_CONTAINING_THE_PID_OF_DHCPCD
|
25
29
|
#
|
26
30
|
# This is the directory where we may find the .pid of dhcpcd.
|
27
31
|
# ========================================================================= #
|
28
|
-
|
32
|
+
DIRECTORY_CONTAINING_THE_PID_OF_DHCPCD = '/var/run/'
|
29
33
|
|
30
34
|
# ========================================================================= #
|
31
35
|
# === ALL_PIDS
|
32
36
|
#
|
33
37
|
# The full name may be 'dhcpcd-enp5s0.pid'.
|
34
38
|
# ========================================================================= #
|
35
|
-
ALL_PIDS =
|
39
|
+
ALL_PIDS = "#{DIRECTORY_CONTAINING_THE_PID_OF_DHCPCD}dhcpcd*.pid"
|
40
|
+
|
41
|
+
# ========================================================================= #
|
42
|
+
# === KILLALL_DHCPCD
|
43
|
+
# ========================================================================= #
|
44
|
+
KILLALL_DHCPCD = 'killall dhcpcd'
|
36
45
|
|
37
46
|
# ========================================================================= #
|
38
47
|
# === initialize
|
39
48
|
# ========================================================================= #
|
40
49
|
def initialize(
|
41
|
-
|
42
|
-
run_already
|
50
|
+
commandline_arguments = nil,
|
51
|
+
run_already = true
|
43
52
|
)
|
44
53
|
reset
|
45
|
-
set_commandline_arguments(
|
54
|
+
set_commandline_arguments(
|
55
|
+
commandline_arguments
|
56
|
+
)
|
46
57
|
run if run_already
|
47
58
|
end
|
48
59
|
|
@@ -52,36 +63,62 @@ class Dhcpcd < Base # === Roebe::Dhcpcd
|
|
52
63
|
def reset
|
53
64
|
super()
|
54
65
|
infer_the_namespace
|
55
|
-
|
66
|
+
infer_the_target_device
|
56
67
|
end
|
57
68
|
|
58
69
|
# ========================================================================= #
|
59
|
-
# ===
|
70
|
+
# === the_target_device?
|
71
|
+
# ========================================================================= #
|
72
|
+
def the_target_device?
|
73
|
+
@internal_hash[:the_target_device]
|
74
|
+
end; alias target_device? the_target_device? # === target_device?
|
75
|
+
|
76
|
+
# ========================================================================= #
|
77
|
+
# === set_the_target_device
|
60
78
|
# ========================================================================= #
|
61
|
-
def
|
79
|
+
def set_the_target_device(
|
80
|
+
i = 'enp5s0'
|
81
|
+
)
|
62
82
|
i = i.join(' ').strip if i.is_a? Array
|
63
|
-
|
83
|
+
if i.is_a?(String) and i.frozen?
|
84
|
+
i = i.dup
|
85
|
+
end
|
86
|
+
i.tr!('ß','0') if i.is_a?(String) and i.include?('ß')
|
87
|
+
@internal_hash[:the_target_device] = i.to_sym
|
88
|
+
end; alias set_target_device set_the_target_device # === set_target_device
|
89
|
+
|
90
|
+
# ========================================================================= #
|
91
|
+
# === process_id_of_dhcpcd?
|
92
|
+
#
|
93
|
+
# This method will yield the process-id of dhcpcd; or "unknown" if
|
94
|
+
# dhcpcd is not running.
|
95
|
+
# ========================================================================= #
|
96
|
+
def process_id_of_dhcpcd?
|
97
|
+
result = `ps ax #{ERROR_LINE}`
|
98
|
+
result = result.split(N).select {|line|
|
99
|
+
line.include?('dhcpcd: ')
|
100
|
+
}
|
101
|
+
if result and result.is_a?(Array)
|
102
|
+
result = result.first
|
103
|
+
if result.is_a?(String) and result.include?(' ')
|
104
|
+
return result.split(' ').first.to_s
|
105
|
+
end
|
106
|
+
end
|
107
|
+
return 'unknown' # Default return value.
|
64
108
|
end
|
65
109
|
|
66
110
|
# ========================================================================= #
|
67
|
-
# ===
|
111
|
+
# === use_enp5s0
|
68
112
|
# ========================================================================= #
|
69
|
-
def
|
70
|
-
|
113
|
+
def use_enp5s0
|
114
|
+
set_the_target_device('enp5s0') # Hardcoded default works fine here.
|
71
115
|
end
|
72
116
|
|
73
117
|
# ========================================================================= #
|
74
|
-
# ===
|
118
|
+
# === infer_the_target_device
|
75
119
|
# ========================================================================= #
|
76
|
-
def
|
77
|
-
|
78
|
-
set_target_device('enp5s0') # Hardcoded default for now.
|
79
|
-
end
|
80
|
-
commandline_arguments?.map! {|entry|
|
81
|
-
entry = entry.dup if entry.frozen?
|
82
|
-
entry.tr!('ß','0') if entry.include? 'ß'
|
83
|
-
entry
|
84
|
-
}
|
120
|
+
def infer_the_target_device
|
121
|
+
set_the_target_device(:eth0)
|
85
122
|
end
|
86
123
|
|
87
124
|
# ========================================================================= #
|
@@ -94,12 +131,26 @@ class Dhcpcd < Base # === Roebe::Dhcpcd
|
|
94
131
|
result.include? ' dhcpcd' # We must exclude 'ruby_dhcpcd' here.
|
95
132
|
end
|
96
133
|
|
134
|
+
# ========================================================================= #
|
135
|
+
# === verbose_is_dhcpcd_running?
|
136
|
+
# ========================================================================= #
|
137
|
+
def verbose_is_dhcpcd_running?
|
138
|
+
case is_dhcpcd_running?
|
139
|
+
when true
|
140
|
+
opne 'dhcpcd is currently running.'
|
141
|
+
when false
|
142
|
+
opne 'dhcpcd is currently NOT running.'
|
143
|
+
end
|
144
|
+
end
|
145
|
+
|
97
146
|
# ========================================================================= #
|
98
147
|
# === kill_the_old_dhcpcd_processes
|
148
|
+
#
|
149
|
+
# This method will kill any running dhcpcd process.
|
99
150
|
# ========================================================================= #
|
100
151
|
def kill_the_old_dhcpcd_processes
|
101
152
|
if is_dhcpcd_running?
|
102
|
-
esystem(
|
153
|
+
esystem(KILLALL_DHCPCD) { :do_colourize_and_pad_the_system_command }
|
103
154
|
end
|
104
155
|
end; alias kill_old_dhcpcd_processes kill_the_old_dhcpcd_processes # === kill_old_dhcpcd_processes
|
105
156
|
alias kill_dhcpcd kill_the_old_dhcpcd_processes # === kill_dhcpcd
|
@@ -112,37 +163,65 @@ class Dhcpcd < Base # === Roebe::Dhcpcd
|
|
112
163
|
return Dir[ALL_PIDS]
|
113
164
|
end
|
114
165
|
|
166
|
+
# ========================================================================= #
|
167
|
+
# === show_help (help tag)
|
168
|
+
# ========================================================================= #
|
169
|
+
def show_help
|
170
|
+
e
|
171
|
+
e 'No help options are documented so far for this class.'
|
172
|
+
e
|
173
|
+
end
|
174
|
+
|
175
|
+
# ========================================================================= #
|
176
|
+
# === start_the_dhcpcd_command (start tag)
|
177
|
+
#
|
178
|
+
# This method will start the actual dhcpcd command.
|
179
|
+
#
|
180
|
+
# The argument that should be passed to this method is the actual
|
181
|
+
# target device, such as 'enp5s0'.
|
182
|
+
# ========================================================================= #
|
183
|
+
def start_the_dhcpcd_command(
|
184
|
+
i = target_device?
|
185
|
+
)
|
186
|
+
opne "#{rev}Now starting the #{steelblue('dhcpcd')} #{rev}command "\
|
187
|
+
"at #{sfancy(i)}#{rev}."
|
188
|
+
_ = " dhcpcd #{i}"
|
189
|
+
e
|
190
|
+
e steelblue(_)
|
191
|
+
e
|
192
|
+
system _
|
193
|
+
end; alias start_dhcpcd start_the_dhcpcd_command # === start_dhcpcd
|
194
|
+
|
115
195
|
# ========================================================================= #
|
116
196
|
# === purge_old_entries
|
117
197
|
# ========================================================================= #
|
118
|
-
def purge_old_entries
|
119
|
-
|
198
|
+
def purge_old_entries(
|
199
|
+
matches = get_matches
|
200
|
+
)
|
201
|
+
matches.each {|entry|
|
120
202
|
if File.exist? entry
|
121
|
-
opne "Purging old entry `#{sfile(entry)}"\
|
122
|
-
"` (Filesize: #{sfancy(File.size(entry).to_s)})."
|
203
|
+
opne "#{rev}Purging the old entry at `#{sfile(entry)}"\
|
204
|
+
"#{rev}` (Filesize: #{sfancy(File.size(entry).to_s)}#{rev})#{rev}."
|
123
205
|
delete(entry)
|
124
206
|
end
|
125
207
|
}
|
126
208
|
end
|
127
209
|
|
128
210
|
# ========================================================================= #
|
129
|
-
# ===
|
130
|
-
#
|
131
|
-
# This method will yield the process-id of dhcpcd; or "unknown" if
|
132
|
-
# dhcpcd is not running.
|
211
|
+
# === do_run_the_default_actions
|
133
212
|
# ========================================================================= #
|
134
|
-
def
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
213
|
+
def do_run_the_default_actions
|
214
|
+
kill_old_dhcpcd_processes
|
215
|
+
purge_old_entries
|
216
|
+
start_the_dhcpcd_command
|
217
|
+
end
|
218
|
+
|
219
|
+
# ========================================================================= #
|
220
|
+
# === run (run tag)
|
221
|
+
# ========================================================================= #
|
222
|
+
def run
|
223
|
+
menu
|
224
|
+
do_run_the_default_actions
|
146
225
|
end
|
147
226
|
|
148
227
|
# ========================================================================= #
|
@@ -153,12 +232,15 @@ class Dhcpcd < Base # === Roebe::Dhcpcd
|
|
153
232
|
)
|
154
233
|
if i.is_a? Array
|
155
234
|
if i.empty?
|
156
|
-
|
235
|
+
show_help
|
157
236
|
else
|
158
237
|
i.each {|entry| menu(entry) }
|
159
238
|
end
|
160
239
|
else
|
161
240
|
case i # case tag
|
241
|
+
# ===================================================================== #
|
242
|
+
# === mydhcpcd --help
|
243
|
+
# ===================================================================== #
|
162
244
|
when /help$/i
|
163
245
|
show_help
|
164
246
|
end
|
@@ -166,47 +248,7 @@ class Dhcpcd < Base # === Roebe::Dhcpcd
|
|
166
248
|
end
|
167
249
|
|
168
250
|
# ========================================================================= #
|
169
|
-
# ===
|
170
|
-
# ========================================================================= #
|
171
|
-
def show_help
|
172
|
-
e 'No help options are documented so far for this class.'
|
173
|
-
end
|
174
|
-
|
175
|
-
# ========================================================================= #
|
176
|
-
# === do_run_the_default_actions
|
177
|
-
# ========================================================================= #
|
178
|
-
def do_run_the_default_actions
|
179
|
-
kill_old_dhcpcd_processes
|
180
|
-
purge_old_entries
|
181
|
-
start_the_dhcpcd_command
|
182
|
-
end
|
183
|
-
|
184
|
-
# ========================================================================= #
|
185
|
-
# === start_the_dhcpcd_command
|
186
|
-
#
|
187
|
-
# This method will start the actual dhcpcd command.
|
188
|
-
#
|
189
|
-
# The argument that should be passed to this method is the actual
|
190
|
-
# target device, such as 'enp5s0'.
|
191
|
-
# ========================================================================= #
|
192
|
-
def start_the_dhcpcd_command(
|
193
|
-
i = target_device?
|
194
|
-
)
|
195
|
-
opne "Now starting the #{steelblue('dhcpcd')} command at #{sfancy(i)}."
|
196
|
-
_ = " dhcpcd #{i}"
|
197
|
-
esystem _, :do_colourize
|
198
|
-
end; alias start_dhcpcd start_the_dhcpcd_command # === start_dhcpcd
|
199
|
-
|
200
|
-
# ========================================================================= #
|
201
|
-
# === run (run tag)
|
202
|
-
# ========================================================================= #
|
203
|
-
def run
|
204
|
-
sanitize_the_commandline
|
205
|
-
menu
|
206
|
-
end
|
207
|
-
|
208
|
-
# ========================================================================= #
|
209
|
-
# === Roebe::Dhcpcd[]
|
251
|
+
# === Roebe::DhcpcdWrapper[]
|
210
252
|
# ========================================================================= #
|
211
253
|
def self.[](i = ARGV)
|
212
254
|
new(i)
|
@@ -218,15 +260,15 @@ end
|
|
218
260
|
# === Roebe.dhcpcd
|
219
261
|
# =========================================================================== #
|
220
262
|
def self.dhcpcd(i = ARGV)
|
221
|
-
|
222
|
-
end
|
263
|
+
Roebe::DhcpcdWrapper.new(i)
|
264
|
+
end; self.instance_eval { alias dhcpcd_wrapper dhcpcd } # === Roebe.dhcpcd_wrapper
|
223
265
|
|
224
266
|
end
|
225
267
|
|
226
268
|
if __FILE__ == $PROGRAM_NAME
|
227
269
|
alias e puts
|
228
|
-
dhcpcd = Roebe
|
270
|
+
dhcpcd = Roebe.dhcpcd(ARGV)
|
229
271
|
e 'Is dhcpcd running right now? '+
|
230
272
|
dhcpcd.is_dhcpcd_running?.to_s
|
231
|
-
end #
|
232
|
-
#
|
273
|
+
end # mydhcpcd eth0
|
274
|
+
# mydhcpcd enp5s0
|
@@ -13,11 +13,11 @@
|
|
13
13
|
# =========================================================================== #
|
14
14
|
# require 'roebe/classes/dhcpcd/kill_dhcpcd.rb'
|
15
15
|
# =========================================================================== #
|
16
|
-
require 'roebe/classes/dhcpcd/
|
16
|
+
require 'roebe/classes/dhcpcd/dhcpcd_wrapper.rb'
|
17
17
|
|
18
18
|
module Roebe
|
19
19
|
|
20
|
-
class KillDhcpcd < ::Roebe::
|
20
|
+
class KillDhcpcd < ::Roebe::DhcpcdWrapper # === Roebe::KillDhcpcd
|
21
21
|
|
22
22
|
# ========================================================================= #
|
23
23
|
# === initialize
|
@@ -22,7 +22,7 @@ module Roebe
|
|
22
22
|
class DoInstall < ::Roebe::Base # === Roebe::DoInstall
|
23
23
|
|
24
24
|
begin
|
25
|
-
require 'rbt/toplevel_methods/
|
25
|
+
require 'rbt/toplevel_methods/toplevel_methods.rb'
|
26
26
|
rescue LoadError; end
|
27
27
|
|
28
28
|
# ========================================================================= #
|
@@ -69,12 +69,13 @@ class DoInstall < ::Roebe::Base # === Roebe::DoInstall
|
|
69
69
|
!can_we_use_meson_in_the_current_directory? and # If we can not run meson.
|
70
70
|
!can_we_use_cmake_in_the_current_directory? and # If we can not run cmake either.
|
71
71
|
!File.exist?('configure') # And there is no file called "configure" yet.
|
72
|
-
opne
|
73
|
-
|
72
|
+
opne "#{rev}No file called #{sfile('configure')} #{rev}was found. "\
|
73
|
+
"Neither could a meson-file"
|
74
74
|
opne 'or a cmake-file be found.'
|
75
|
-
opne 'Thus, since a file called '+sfile('autogen.sh')+
|
76
|
-
'actually found, it will be run next.'
|
77
|
-
opne 'If all goes well then a file called '+sfile('configure')+
|
75
|
+
opne 'Thus, since a file called '+sfile('autogen.sh')+rev+
|
76
|
+
' was actually found, it will be run next.'
|
77
|
+
opne 'If all goes well then a file called '+sfile('configure')+rev+
|
78
|
+
' will be'
|
78
79
|
opne 'created, which can then be used to compile the given program.'
|
79
80
|
do_invoke_autogen_sh
|
80
81
|
end
|
data/lib/roebe/classes/done.rb
CHANGED
@@ -104,7 +104,7 @@ class Done < ::Roebe::Base # === Roebe::Done
|
|
104
104
|
is_on_roebe? and
|
105
105
|
is_in_studium_dir? and
|
106
106
|
pdf_has_no_title?(i)
|
107
|
-
require 'pdf_paradise/
|
107
|
+
require 'pdf_paradise/utility_scripts/automatic_pdf_title.rb'
|
108
108
|
# =================================================================== #
|
109
109
|
# Set an autotitle in this case.
|
110
110
|
# =================================================================== #
|
@@ -55,8 +55,8 @@ class DowncaseExtension < Base # === Roebe::DowncaseExtension
|
|
55
55
|
# ======================================================================= #
|
56
56
|
i.map! {|entry|
|
57
57
|
if File.directory? entry
|
58
|
-
opne 'Expanding the directory '+sdir(entry)+
|
59
|
-
|
58
|
+
opne 'Expanding the directory '+sdir(entry)+
|
59
|
+
rev+' to all files within that directory.'
|
60
60
|
entry = Dir[(entry+'/*').squeeze('/')].select {|inner_entry|
|
61
61
|
File.file? inner_entry
|
62
62
|
}
|
@@ -93,8 +93,8 @@ class DowncaseExtension < Base # === Roebe::DowncaseExtension
|
|
93
93
|
extension_type = File.extname(entry)
|
94
94
|
new_name = entry.gsub(/#{extension_type}/,'')+extension_type.downcase
|
95
95
|
unless new_name == entry
|
96
|
-
opne "Working now on `#{sfile(entry)}`. Its file extension"
|
97
|
-
opne "will be downcased towards #{sfile(new_name)}."
|
96
|
+
opne "#{rev}Working now on `#{sfile(entry)}#{rev}`. Its file extension"
|
97
|
+
opne "#{rev}will be downcased towards #{sfile(new_name)}#{rev}."
|
98
98
|
rename(entry, new_name)
|
99
99
|
end
|
100
100
|
}
|
data/lib/roebe/classes/email.rb
CHANGED
@@ -214,17 +214,16 @@ class Email < Base # === Roebe::Email
|
|
214
214
|
else
|
215
215
|
case i # case tag
|
216
216
|
# ======================================================================= #
|
217
|
-
# ===
|
217
|
+
# === --open
|
218
218
|
# ======================================================================= #
|
219
|
-
when /-?-?
|
220
|
-
|
219
|
+
when /-?-?open$/i
|
220
|
+
open_this_file # Open the file.
|
221
221
|
exit
|
222
222
|
# ======================================================================= #
|
223
|
-
# === --
|
223
|
+
# === email --help
|
224
224
|
# ======================================================================= #
|
225
|
-
when /-?-?
|
226
|
-
|
227
|
-
open_this_file # Open the file.
|
225
|
+
when /-?-?help/i
|
226
|
+
show_help
|
228
227
|
exit
|
229
228
|
end
|
230
229
|
end
|
@@ -257,7 +256,7 @@ class Email < Base # === Roebe::Email
|
|
257
256
|
e
|
258
257
|
if is_on_roebe? # On my home system we will show a bit more information.
|
259
258
|
opne 'We will however feedback the whole datastructure now:'
|
260
|
-
pp
|
259
|
+
pp dataset_from_the_contacts_file?
|
261
260
|
end
|
262
261
|
end
|
263
262
|
|
@@ -275,10 +274,10 @@ class Email < Base # === Roebe::Email
|
|
275
274
|
# In this case no result was found, so first check the dataset from
|
276
275
|
# the local .yml file, before bailing out.
|
277
276
|
# ===================================================================== #
|
278
|
-
if
|
277
|
+
if dataset_from_the_contacts_file?.nil?
|
279
278
|
not_found_any_result_for(i)
|
280
279
|
else
|
281
|
-
index =
|
280
|
+
index = dataset_from_the_contacts_file?.find_index {|entry|
|
282
281
|
_ = entry.first
|
283
282
|
_.downcase!
|
284
283
|
unless i.nil?
|
@@ -289,7 +288,7 @@ class Email < Base # === Roebe::Email
|
|
289
288
|
# ================================================================= #
|
290
289
|
# In this case, tap into the dataset provided by the yaml file.
|
291
290
|
# ================================================================= #
|
292
|
-
email =
|
291
|
+
email = dataset_from_the_contacts_file?[index][2].to_s
|
293
292
|
report_the_result_for_this_email_address(email)
|
294
293
|
else
|
295
294
|
not_found_any_result_for(i)
|
@@ -305,27 +304,31 @@ class Email < Base # === Roebe::Email
|
|
305
304
|
@internal_hash[:dataset_from_the_contacts_file]
|
306
305
|
end
|
307
306
|
|
308
|
-
# ========================================================================= #
|
309
|
-
# === run (run tag)
|
310
|
-
# ========================================================================= #
|
311
|
-
def run
|
312
|
-
menu(
|
313
|
-
commandline_arguments_with_hyphens?
|
314
|
-
)
|
315
|
-
_ = commandline_arguments?.join(' ').strip
|
316
|
-
if _.nil? or _.empty?
|
317
|
-
e 'Please provide an argument.'
|
318
|
-
else # This here is the primary clause.
|
319
|
-
run_the_primary_task_of_this_class(_)
|
320
|
-
end
|
321
|
-
end
|
322
|
-
|
323
307
|
# ========================================================================= #
|
324
308
|
# === try_to_obtain_the_corresponding_email
|
325
309
|
# ========================================================================= #
|
326
310
|
def try_to_obtain_the_corresponding_email(i)
|
327
311
|
result = case i # case tag, email tag
|
328
312
|
# ======================================================================= #
|
313
|
+
# === email schildberger
|
314
|
+
# ======================================================================= #
|
315
|
+
when 'schildberger'
|
316
|
+
'andreas.schildberger@boku.ac.at'
|
317
|
+
# ======================================================================= #
|
318
|
+
# === email koller
|
319
|
+
# ======================================================================= #
|
320
|
+
when 'koller',
|
321
|
+
'bernhard_koller'
|
322
|
+
'bernhard.koller@tuwien.ac.at'
|
323
|
+
# ======================================================================= #
|
324
|
+
# === email tu_studienabteilung
|
325
|
+
# ======================================================================= #
|
326
|
+
when 'tu_studienabteilung',
|
327
|
+
'tuwien','sekretariat',
|
328
|
+
'tu',40
|
329
|
+
# 'studienabteilung@zv.tuwien.ac.at'
|
330
|
+
'studienabteilung@tuwien.ac.at'
|
331
|
+
# ======================================================================= #
|
329
332
|
# === email byrne
|
330
333
|
# ======================================================================= #
|
331
334
|
when /^-?-?byrnes?$/i
|
@@ -401,12 +404,6 @@ class Email < Base # === Roebe::Email
|
|
401
404
|
23
|
402
405
|
'studabt@boku.ac.at'
|
403
406
|
# ======================================================================= #
|
404
|
-
# === email koller
|
405
|
-
# ======================================================================= #
|
406
|
-
when 'koller',
|
407
|
-
'bernhard_koller'
|
408
|
-
'bernhard.koller@tuwien.ac.at'
|
409
|
-
# ======================================================================= #
|
410
407
|
# === email vetmed
|
411
408
|
# ======================================================================= #
|
412
409
|
when 'vetmed',
|
@@ -460,14 +457,6 @@ class Email < Base # === Roebe::Email
|
|
460
457
|
44
|
461
458
|
'franco.laccone@meduniwien.ac.at'
|
462
459
|
# ======================================================================= #
|
463
|
-
# === email tu_studienabteilung
|
464
|
-
# ======================================================================= #
|
465
|
-
when 'tu_studienabteilung',
|
466
|
-
'tuwien','sekretariat',
|
467
|
-
'tu',40
|
468
|
-
# 'studienabteilung@zv.tuwien.ac.at')
|
469
|
-
'studienabteilung@tuwien.ac.at'
|
470
|
-
# ======================================================================= #
|
471
460
|
# === email isabel
|
472
461
|
# ======================================================================= #
|
473
462
|
when 'isabel'
|
@@ -863,6 +852,21 @@ class Email < Base # === Roebe::Email
|
|
863
852
|
end; alias try_to_find_this_entry try_to_obtain_the_corresponding_email # === try_to_find_this_entry
|
864
853
|
alias try_to_find_entry try_to_obtain_the_corresponding_email # === try_to_find_this_entry
|
865
854
|
|
855
|
+
# ========================================================================= #
|
856
|
+
# === run (run tag)
|
857
|
+
# ========================================================================= #
|
858
|
+
def run
|
859
|
+
menu(
|
860
|
+
commandline_arguments_with_hyphens?
|
861
|
+
)
|
862
|
+
_ = commandline_arguments?.join(' ').strip
|
863
|
+
if _.nil? or _.empty?
|
864
|
+
e 'Please provide an argument.'
|
865
|
+
else # This here is the primary clause.
|
866
|
+
run_the_primary_task_of_this_class(_)
|
867
|
+
end
|
868
|
+
end
|
869
|
+
|
866
870
|
# ========================================================================= #
|
867
871
|
# === Roebe::Email[]
|
868
872
|
# ========================================================================= #
|
data/lib/roebe/classes/enable.rb
CHANGED
data/lib/roebe/classes/github.rb
CHANGED
@@ -42,7 +42,7 @@ class Github < Base # === Roebe::Github
|
|
42
42
|
# ========================================================================= #
|
43
43
|
def run
|
44
44
|
_ = first_argument?
|
45
|
-
require 'rbt/
|
45
|
+
require 'rbt/actions/individual_actions/cookbooks/sanitize_cookbook/sanitize_cookbook.rb'
|
46
46
|
if _
|
47
47
|
dataset = RBT.cookbook_for(_)
|
48
48
|
url = dataset.git_url?
|
@@ -63,7 +63,7 @@ class InstallThisKonsoleTheme < ::Roebe::Base # === Roebe::InstallThisKonsoleThe
|
|
63
63
|
# ========================================================================= #
|
64
64
|
def run
|
65
65
|
_ = first_argument?
|
66
|
-
|
66
|
+
opne "#{rev}Now copying towards `#{sdir(@copy_towards_this_target)}#{rev}`."
|
67
67
|
copy_file(first_argument?, @copy_towards_this_target)
|
68
68
|
e 'You still have to do this step:'
|
69
69
|
e
|