Starting from Monday (10th of May 2021), 2 Factor Authentication enforcement will be enabled. If 2FA is not configured within 48h, you will not be able to perform any action on GitLab until 2FA is configured. Please click here to learn how to do that.

Commit fd388881 authored by Alex Theg's avatar Alex Theg
Browse files

copy/rename scripts that rely on shell to execute

parent a83e0f4c
# starting = Time.now
xsweet_script_path = Dir.glob("XSweet-*").pop
rootDir = Dir.getwd
convertDir = rootDir + "/to_convert"
book_list = Dir["#{convertDir}/*"].select {|cand| File.directory? cand}
book_list.delete("#{convertDir}/temp")
puts "BOOK LIST"
number_label = 1
book_list.each do |book|
puts "#{number_label}: #{book}"
number_label += 1
end
puts "BOOK LIST END"
book_list.each do |book|
book = book.split("/").last
puts "BOOK: #{book}"
file_path_list = Dir["#{convertDir}/#{book}/*"].select {|cand| File.directory? cand}
# puts file_path_list
file_list = []
file_path_list.each do |file_path|
file_list << file_path.split("/").last
end
newDir = rootDir + "/#{xsweet_script_path}/scripts"
Dir.chdir newDir
file_list.each do |chapter|
puts "converting: #{chapter}"
%x`sh execute_chain.sh #{convertDir}/#{book} #{book} #{chapter}`
end
puts "done with #{book}"
end
# ending = Time.now
# elapsed = ending - starting
# puts elapsed
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment