Skip to content

Commit

Permalink
various fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
m4rco- committed May 7, 2013
1 parent 8040743 commit 16df8c6
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 11 deletions.
3 changes: 3 additions & 0 deletions .gitignore
@@ -1,5 +1,6 @@
*.gem
*.rbc
*.log
.DS_Store
.bundle
.config
Expand All @@ -9,6 +10,8 @@ InstalledFiles
_yardoc
coverage
doc/
var/
opt/
lib/bundler/man
pkg
rdoc
Expand Down
8 changes: 4 additions & 4 deletions bin/dorothy_start
Expand Up @@ -6,9 +6,9 @@

require 'rubygems'
require 'trollop'
#require 'dorothy2' #comment for testing/developmnet
require 'dorothy2' #comment for testing/developmnet

load '../lib/dorothy2.rb' #uncomment for testing/developmnet
#load '../lib/dorothy2.rb' #uncomment for testing/developmnet

include Dorothy

Expand Down Expand Up @@ -142,12 +142,12 @@ if Util.exists?(sfile)
end
end
else
puts "[WARNING]".red + " A source file doesn't exist, please crate one in the /etc folder"
puts "[WARNING]".red + " A source file doesn't exist, please crate one into #{home}/etc. See the example file in #{HOME}/etc/sandboxes.yml.example"
exit(0)
end

unless Util.exists?(sboxfile)
puts "[WARNING]".red + " There is no sandbox configured yet. Please do it now"
puts "[WARNING]".red + " There is no sandbox configured yet. Please do it now."
DoroConfig.create_sandbox(sboxfile)
DoroConfig.init_sandbox(sboxfile)
end
Expand Down
4 changes: 2 additions & 2 deletions bin/dorothy_stop
Expand Up @@ -8,9 +8,9 @@

require 'rubygems'
require 'trollop'
#require 'dorothy2'
require 'dorothy2'

load '../lib/dorothy2.rb'
#load '../lib/dorothy2.rb'

include Dorothy

Expand Down
14 changes: 9 additions & 5 deletions lib/dorothy2/do-init.rb
Expand Up @@ -11,13 +11,17 @@ module DoroConfig
def init_home(home)
puts "INIT".yellow + " Creating Directoy structure in #{home}"
Dir.mkdir(home)
Dir.mkdir("#{home}/opt")
Dir.mkdir("#{home}/opt/bins")
Dir.mkdir("#{home}/opt/analyzed")
unless Utils.exists?("#{home}/opt")
Dir.mkdir("#{home}/opt")
Dir.mkdir("#{home}/opt/bins")
Dir.mkdir("#{home}/opt/analyzed")
end
Dir.mkdir("#{home}/etc")
Dir.mkdir("#{home}/etc/geo")
Dir.mkdir("#{home}/var")
Dir.mkdir("#{home}/var/log")
unless Utils.exists?("#{home}/var")
Dir.mkdir("#{home}/var")
Dir.mkdir("#{home}/var/log")
end
puts "INIT".yellow + " Done"
end

Expand Down

0 comments on commit 16df8c6

Please sign in to comment.