main
sandyx 11 months ago
parent af91725d03
commit 3a3ab06e23

@ -2,9 +2,10 @@
require 'fileutils'
RUBDIR = "#{Dir.home}/.rub"
RUBDIR = "#{Dir.home}/.rub/"
File.mkdir RUBDIR unless File.exist? RUBDIR
FileUtils.cp("build.rb", RUBDIR)
FileUtils.chmod("+x", "rub")
FileUtils.cp("rub", "/usr/local/bin")
FileUtils.cp_r(Dir.pwd, RUBDIR)

10
rub

@ -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

Loading…
Cancel
Save