Sha256: 243f00f29ae1ac624b920f3f9f2ee4b71533b6c313beb204809766d5c9f572b8

Contents?: true

Size: 1.22 KB

Versions: 1

Compression:

Stored size: 1.22 KB

Contents

# frozen_string_literal: true

require_relative 'void/stage'
require_relative 'void/config'
require_relative 'void/chroot'
#require_relative 'void/sources'
require_relative 'void/boot'

module Getch
  module Void
    class Main
      def initialize
        @state = Getch::States.new
      end

      def root_fs
        return if STATES[:gentoo_base]

        xbps = Getch::Void::RootFS.new
        xbps.search_archive
        xbps.download
        xbps.checksum
        @state.stage3
      end

      def config
        return if STATES[:gentoo_config]

        config = Getch::Void::Config.new
        config.host
        config.network
        config.system
        config.locale
        @state.config
      end

      def chroot
        return if STATES[:gentoo_kernel]

        chroot = Getch::Void::Chroot.new
        chroot.update
        chroot.fs
        chroot.extras
        chroot.install_pkgs
      end

      def kernel
        return if STATES[:gentoo_kernel]

        Getch::Void::Sources.new
        @state.kernel
      end

      def boot
        boot = Getch::Void::Boot.new
        boot.new_user
        boot.fstab
        boot.dracut
        boot.grub
        boot.initramfs
        boot.finish
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
getch-0.1.9 lib/getch/void.rb