summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordmitry kim <jason@nichego.net>2008-03-12 02:52:53 +0300
committerdmitry kim <jason@nichego.net>2008-03-12 02:52:53 +0300
commit15846be1af87eefbb2d339c4c28ffbc9c1268d6a (patch)
tree34ba61b16357c092b6d6003cbc4d3b7dc2bb580c
parent539c526cf8ec0b4b07d84541cd3ce27d08ac946b (diff)
* we're now "git version", not "svn version" by default
-rwxr-xr-xbin/rbot8
-rwxr-xr-xlaunch_here.rb12
-rw-r--r--lib/rbot/rbotconfig.rb2
-rwxr-xr-xsetup.rb2
4 files changed, 11 insertions, 13 deletions
diff --git a/bin/rbot b/bin/rbot
index 8e762569..6d8ecec3 100755
--- a/bin/rbot
+++ b/bin/rbot
@@ -74,13 +74,11 @@ require 'etc'
require 'getoptlong'
require 'fileutils'
-$version="0.9.11-svn"
+$version="0.9.11-git"
$opts = Hash.new
-if $version =~ /svn/
- if defined?(SVN_DIR) and File.exists?(File.join(SVN_DIR, '.git'))
- $version.sub!('svn', 'git')
-
+if $version =~ /git/
+ if defined?(SCM_DIR) and File.exists?(File.join(SCM_DIR, '.git'))
git_out = `git status`
git_out.match(/^# On branch (.*)\n/)
diff --git a/launch_here.rb b/launch_here.rb
index 033e075f..80d6c39c 100755
--- a/launch_here.rb
+++ b/launch_here.rb
@@ -3,18 +3,18 @@
# Load rbot from this directory. (No need to install it with setup.rb)
#
-SVN_DIR = File.expand_path(File.dirname('__FILE__'))
-puts "Running from #{SVN_DIR}"
+SCM_DIR = File.expand_path(File.dirname('__FILE__'))
+puts "Running from #{SCM_DIR}"
-$:.unshift File.join(SVN_DIR, 'lib')
+$:.unshift File.join(SCM_DIR, 'lib')
module Irc
class Bot
module Config
- @@datadir = File.join SVN_DIR, 'data/rbot'
- @@coredir = File.join SVN_DIR, 'lib/rbot/core'
+ @@datadir = File.join SCM_DIR, 'data/rbot'
+ @@coredir = File.join SCM_DIR, 'lib/rbot/core'
end
end
end
-load File.join(SVN_DIR, 'bin/rbot')
+load File.join(SCM_DIR, 'bin/rbot')
diff --git a/lib/rbot/rbotconfig.rb b/lib/rbot/rbotconfig.rb
index 1c10e5af..97f8173e 100644
--- a/lib/rbot/rbotconfig.rb
+++ b/lib/rbot/rbotconfig.rb
@@ -28,7 +28,7 @@ class Bot
debug "trying to load rubygems"
require 'rubygems'
debug "loaded rubygems, looking for rbot-#$version"
- if $version =~ /(.*)-svn\Z/
+ if $version =~ /(.*)-(svn|git)\Z/
version = $1
else
version = $version
diff --git a/setup.rb b/setup.rb
index 85a47543..cdb7183c 100755
--- a/setup.rb
+++ b/setup.rb
@@ -553,7 +553,7 @@ module FileOperations
end
REJECT_DIRS = %w(
- CVS SCCS RCS CVS.adm .svn
+ CVS SCCS RCS CVS.adm .svn .git
)
def all_dirs_in(dirname)