Now uses weird-crystal-base.
parent
c8228e95f7
commit
4fbc7a1928
|
@ -8,6 +8,8 @@ authors:
|
|||
# Short description of package
|
||||
|
||||
dependencies:
|
||||
weird-crystal-base:
|
||||
git: https://git.karchnu.fr/WeirdOS/weird-crystal-base
|
||||
specparser:
|
||||
git: https://git.karchnu.fr/WeirdOS/recipes-parser
|
||||
|
||||
|
|
34
src/io.cr
34
src/io.cr
|
@ -1,34 +0,0 @@
|
|||
require "colorize"
|
||||
|
||||
class Weird::Context
|
||||
# FIXME: Use log files.
|
||||
# FIXME: def log(), that puts stuff as-is in the logs.
|
||||
|
||||
def debug(text)
|
||||
STDERR.puts ":: #{text}".colorize(:cyan)
|
||||
STDERR.flush
|
||||
end
|
||||
def info(text)
|
||||
STDOUT
|
||||
.<<(":: ".colorize(:blue))
|
||||
.<<(text.colorize(:white))
|
||||
.<<("\n")
|
||||
STDOUT.flush
|
||||
end
|
||||
def title(text)
|
||||
STDOUT
|
||||
.<<("|> ".colorize(:blue).bright)
|
||||
.<<(text.colorize(:white).bright)
|
||||
.<<("\n")
|
||||
STDOUT.flush
|
||||
end
|
||||
def warning(text)
|
||||
STDERR.puts ":: #{text}".colorize(:yellow)
|
||||
STDERR.flush
|
||||
end
|
||||
def error(text)
|
||||
STDERR.puts "!! #{text}".colorize(:red)
|
||||
STDERR.flush
|
||||
end
|
||||
end
|
||||
|
|
@ -3,13 +3,13 @@ require "uuid"
|
|||
require "file_utils"
|
||||
require "uri"
|
||||
|
||||
require "../io.cr"
|
||||
require "weird-crystal-base"
|
||||
|
||||
require "./weird.cr"
|
||||
require "./configuration.cr"
|
||||
require "./repository.cr"
|
||||
|
||||
class Package::Context < Weird::Context
|
||||
class Package::Context < Weird::Base
|
||||
property root = "/"
|
||||
|
||||
# Stores informations about already installed packages, their
|
||||
|
|
Loading…
Reference in New Issue