class RBT::InstallGraalvm
Public Class Methods
new( commandline_arguments = ARGV, run_already = true )
click to toggle source
Public Instance Methods
reset()
click to toggle source
run()
click to toggle source
#¶ ↑
run (run tag)¶ ↑
#¶ ↑
# File lib/rbt/utility_scripts/install_graalvm.rb, line 45 def run # ======================================================================= # # (1) First obtain the latest graalvm version "dynamically", from the # main source-directory in use. # ======================================================================= # src_dir = src_dir? target_directory = src_dir+'graalvm' cd(target_directory) files = Dir['*.tar*'] if files.empty? opne "#{rev}No files were found in #{sdir(target_directory)}#{rev}." else # ===================================================================== # # (2) Now we can create a new directory: # ===================================================================== # this_archive = files.first # ===================================================================== # # this_archive is now something like: "graalvm-22.2.0-64bit.tar.xz" # ===================================================================== # raw_name = remove_archive_at_the_end(this_archive.dup).sub(/-64bit/,'') action(:create_appdir_skeleton, raw_name) _version = ProgramInformation.return_version(raw_name) # Not needed right now. # ===================================================================== # # (3) Now we can copy the .tar.xz file: # ===================================================================== # new_target_directory = "#{program_dir?}Graalvm/Current/" copy_file(this_archive, new_target_directory) cd(new_target_directory) # ===================================================================== # # (4) Extract it next: # ===================================================================== # extract_this_archive(this_archive) { :be_verbose } cd(remove_archive_at_the_end(this_archive)) cd 'bin' target_dir = return_pwd cd '/usr/bin/' # ===================================================================== # # (5) Finally run the proper symlink from the roebe project # ===================================================================== # require 'roebe/classes/symlink_files_from_that_directory_to_the_current_directory/symlink_files_from_that_directory_to_the_current_directory.rb' Roebe::SymlinkFilesFromThatDirectoryToTheCurrentDirectory.new(target_dir) cd(File.dirname(target_dir)) target_dir = return_pwd opne "#{rev}Next removing a few unimportant files from "\ "#{sdir(target_dir)}#{rev}." remove_file('GRAALVM-README.md') { :be_verbose } remove_file('LICENSE.txt') { :be_verbose } remove_file('THIRD_PARTY_LICENSE.txt') { :be_verbose } end end