projects
/
booh
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c982aca
)
booh: add mproc autodetection
author
gc
<gc>
Tue, 16 Oct 2007 19:51:44 +0000
(19:51 +0000)
committer
gc
<gc>
Tue, 16 Oct 2007 19:51:44 +0000
(19:51 +0000)
bin/booh
patch
|
blob
|
history
diff --git
a/bin/booh
b/bin/booh
index f5734375d2147f3df46a32d635e76d4e77157999..18861ee568edaf0fc777982c202c17ff27ac4f3d 100755
(executable)
--- a/
bin/booh
+++ b/
bin/booh
@@
-114,7
+114,15
@@
def read_config
if !FileTest.directory?(File.expand_path('~/.booh'))
system("mkdir ~/.booh")
end
-
+ if $config['mproc'].nil?
+ cpus = 0
+ for line in IO.readlines('/proc/cpuinfo') do
+ line =~ /^processor/ and cpus += 1
+ end
+ if cpus > 1
+ $config['mproc'] = cpus
+ end
+ end
$tempfiles = []
$todelete = []
end