From: <jj...@us...> - 2004-02-27 13:20:49
|
Update of /cvsroot/ngetsuite/ngetsuite In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10822 Modified Files: daemon.rb ngetsuite.rb resetdb.rb Log Message: even more sexier daemon, unified colors (blue: info, green: success, yellow: error in nget, red: error in ngetsuite) added an arg for Utils.debug to allow \r instead of \n, used it everywhere Index: daemon.rb =================================================================== RCS file: /cvsroot/ngetsuite/ngetsuite/daemon.rb,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** daemon.rb 20 Feb 2004 14:42:43 -0000 1.13 --- daemon.rb 27 Feb 2004 13:12:06 -0000 1.14 *************** *** 1,5 **** #!/usr/bin/env ruby ! $wd = __FILE__.sub(/\/[^\/]*$/, '') $wd = Dir::pwd if $wd == '.' or not FileTest.directory? $wd Dir.chdir($wd) --- 1,5 ---- #!/usr/bin/env ruby ! $wd = __FILE__.sub(/^(.*)\/[^\/]*$/, '\1') $wd = Dir::pwd if $wd == '.' or not FileTest.directory? $wd Dir.chdir($wd) Index: ngetsuite.rb =================================================================== RCS file: /cvsroot/ngetsuite/ngetsuite/ngetsuite.rb,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** ngetsuite.rb 9 Feb 2004 21:34:49 -0000 1.19 --- ngetsuite.rb 27 Feb 2004 13:12:06 -0000 1.20 *************** *** 1,5 **** #!/usr/bin/env ruby ! wd = __FILE__.sub(/\/[^\/]*$/, '') Dir.chdir(wd) if FileTest.directory? wd --- 1,5 ---- #!/usr/bin/env ruby ! wd = __FILE__.sub(/^(.*)\/[^\/]*$/, '\1') Dir.chdir(wd) if FileTest.directory? wd Index: resetdb.rb =================================================================== RCS file: /cvsroot/ngetsuite/ngetsuite/resetdb.rb,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** resetdb.rb 20 Feb 2004 14:42:43 -0000 1.3 --- resetdb.rb 27 Feb 2004 13:12:06 -0000 1.4 *************** *** 6,10 **** require 'ngetsuite/db' ! savedgroups = Db.dbh.select_all('select `fullname`,`shortname`,`directory`,`active`,`date_added`,`description` from `groups`') savedqueues = Db.dbh.select_all('select * from `queue`') puts "Queues (to restore manually)" + savedqueues.map{ |q| "\n"+q.map{|e| e.to_s }.join(', ') }.join --- 6,10 ---- require 'ngetsuite/db' ! savedgroups = Db.dbh.select_all('select `fullname`,`shortname`,`directory`,`active`,`date_added`,`description` from `groups` order by `groupindex`') savedqueues = Db.dbh.select_all('select * from `queue`') puts "Queues (to restore manually)" + savedqueues.map{ |q| "\n"+q.map{|e| e.to_s }.join(', ') }.join |