From: Daiji KANEMATSU Date: 2000-02-16T14:53:35+09:00 Subject: [ruby-list:20766] cvsmailer --Multipart_Wed_Feb_16_14:53:30_2000-1 Content-Type: text/plain; charset=ISO-2022-JP 兼松と申します。 RAAからcvsmailer というのを取ってきて使ってみています。 で、こちらの環境には /usr/bin/whoami がないようです。 (/usr/ucb/whoami ならあります。OS:Solaris2.6) そんな環境の人のために一応パッチを作ってみました。 # でも /usr/bin/whoami -> /usr/ucb/whoami のsymbolic linkを張れば # 良いだけかも。 # さらにREADME.en に # ** Todo # - Japanese document/comment in script # - Customisability # って書いてあるから... もうすこし待ったほうが良かったかも # おおきなお世話でしたら無視してくださいませ。 -- Software Research Associates,Inc Daiji KANEMATSU http://www.sra.co.jp/people/kanematu/ PGP public key: http://www.sra.co.jp/people/kanematu/my_pub_key.txt --Multipart_Wed_Feb_16_14:53:30_2000-1 Content-Type: application/octet-stream; type=patch Content-Disposition: attachment; filename="loginfo.rb.patch" Content-Transfer-Encoding: 7bit 12a13,30 > # find the command 'whoami' > whoamifiles = ["/usr/bin/whoami", "/usr/ucb/whoami"] > whoami = nil > > whoamifiles.each do |elem| > begin > if (File.ftype(elem) == "file") > whoami = elem > break > end > rescue > end > end > > if whoami == nil > print "whoami: command not found\n" > exit 1 > end 50c68 < `/usr/bin/whoami`.chomp! , Process.getpgrp() ) --- > `#{whoami}`.chomp! , Process.getpgrp() ) 62c80 < `/usr/bin/whoami`.chomp! , Process.getpgrp() ) --- > `#{whoami}`.chomp! , Process.getpgrp() ) 99c117 < `/usr/bin/whoami`.chomp!, Process.getpgrp() ) --- > `#{whoami}`.chomp!, Process.getpgrp() ) 142c160 < `/usr/bin/whoami`.chomp!, Process.getpgrp() ) --- > `#{whoami}`.chomp!, Process.getpgrp() ) 144c162 < `/usr/bin/whoami`.chomp!, Process.getpgrp() ) --- > `#{whoami}`.chomp!, Process.getpgrp() ) 146c164 < `/usr/bin/whoami`.chomp! , Process.getpgrp() ) --- > `#{whoami}`.chomp! , Process.getpgrp() ) 278c296 < sm.sendmail( t, `/usr/bin/whoami`.chomp! , [mailaddr] ) --- > sm.sendmail( t, `#{whoami}`.chomp! , [mailaddr] ) --Multipart_Wed_Feb_16_14:53:30_2000-1 Content-Type: application/octet-stream; type=patch Content-Disposition: attachment; filename="commitinfo.rb.patch" Content-Transfer-Encoding: 7bit 12a13,33 > > # find the command 'whoami' > whoamifiles = ["/usr/bin/whoami", "/usr/ucb/whoami"] > whoami = nil > > whoamifiles.each do |elem| > begin > if (File.ftype(elem) == "file") > whoami = elem > break > end > rescue > end > end > > if whoami == nil > print "whoami: command not found\n" > exit 1 > end > > 26c47 < `/usr/bin/whoami`.chomp! , Process.getpgrp() ) --- > `#{whoami}`.chomp! , Process.getpgrp() ) --Multipart_Wed_Feb_16_14:53:30_2000-1--