|
|
|
|
@ -10,8 +10,9 @@ HELP = "\trub init <name> - initialize a new project\n" \
|
|
|
|
|
ANSI_RED = "\e[31m"
|
|
|
|
|
ANSI_CLEAR = "\e[0m"
|
|
|
|
|
RUB = "#{ANSI_RED}RUB#{ANSI_CLEAR}"
|
|
|
|
|
RUBGIT="#{RUB}/rub/"
|
|
|
|
|
|
|
|
|
|
RUBDIR = "#{Dir.home}/.rub/"
|
|
|
|
|
RUBDIR = "#{Dir.home}/.rub/"rub
|
|
|
|
|
|
|
|
|
|
def error(msg)
|
|
|
|
|
puts "#{RUB}: error: #{msg}"
|
|
|
|
|
@ -39,6 +40,10 @@ def rub_init(name)
|
|
|
|
|
`git branch -m main`
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def rub_update
|
|
|
|
|
FileUtils.chdir(RUBGIT)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def parse_arg(arg)
|
|
|
|
|
case arg
|
|
|
|
|
when "init"
|
|
|
|
|
@ -50,6 +55,9 @@ def parse_arg(arg)
|
|
|
|
|
when "help"
|
|
|
|
|
puts HELP
|
|
|
|
|
|
|
|
|
|
when "update"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|