ふなばです。

弱輩ながらサイン本獲得に挑戦します。みなさん、なかなか立派なものをつくっ
ておられますが、僕にはむりなんで、小物で勝負です。というわけで、第一弾、
rar です。

rar を rar してみたので、ruby -x 'このメイル' としてください。


#! /usr/local/bin/ruby

require 'base64'
text = <<'RAR_EOF'
ICAgICAgICAgICAgICAgICAgICAgICAgIFJ1YnkgpaKhvKWrpaSl9KTOuu7ArgoKpLOk7KTP
IHNoYXIgpM4gUnVieSDIx6THpLmho7TKw7GkzqS/pOGky83NobmkysCpuMKkrKSipOqk3qS5
oaOlx6Wjpeylr6XICqXqpM+koqTEpKukqKTepLuk86GjpdGhvKXfpcOlt6XnpfOk5KW/paSl
4KW5pb+l86XXpM7K3cK4pM+kt6TepLuk86GjCgqkxKSrpKSkq6S/pM+0ysOxoaOkv6TIpKik
0KGicmFyIKTOpb2hvKW5pPKl4aWkpeukx8H3pOqkv6SkpMqk6aGipMSkrqTOpOgKpKaky6S3
pN6kuaGjCgogICAgcmFyIFJFQURNRSByYXIucmIgfCBtYWlsIC1zICdyYXIgc291cmNlJyB0
YWRmCg==
RAR_EOF
begin
  output = File.open('README', 'w')
  output.write decode64(text)
  output.close
rescue
  $stderr.puts "restore of README failed"
  exit 1
end
text = <<'RAR_EOF'
IyEgL3Vzci9sb2NhbC9iaW4vcnVieQoKcmVxdWlyZSAnYmFzZTY0JwpwdXRzICIjISAvdXNy
L2xvY2FsL2Jpbi9ydWJ5XG5cbnJlcXVpcmUgJ2Jhc2U2NCciCmZvciBmaWxlIGluICQqCiAg
YmVnaW4KICAgIGlucHV0ID0gRmlsZS5vcGVuKGZpbGUsICdyJykKICAgIHRleHQgPSAoaW5w
dXQucmVhZCBvciAnJykKICAgIGlucHV0LmNsb3NlCiAgcmVzY3VlCiAgICAkc3RkZXJyLnB1
dHMgInN0b3JlIG9mICN7ZmlsZX0gZmFpbGVkIgogICAgZXhpdCAxCiAgZW5kCiAgcHJpbnQg
PDwiU0NSX0VPRiIKdGV4dCA9IDw8J1JBUl9FT0YnCiN7YmVnaW4KICAgIHRleHQgPSBlbmNv
ZGU2NCh0ZXh0KQogICAgdGV4dC5nc3ViISgvLlx7NzJcfS8sICJcXFxcJlxuIikKICAgIHRl
eHQKICBlbmR9ClJBUl9FT0YKYmVnaW4KICBvdXRwdXQgPSBGaWxlLm9wZW4oJyN7ZmlsZX0n
LCAndycpCiAgb3V0cHV0LndyaXRlIGRlY29kZTY0KHRleHQpCiAgb3V0cHV0LmNsb3NlCnJl
c2N1ZQogICRzdGRlcnIucHV0cyAicmVzdG9yZSBvZiAje2ZpbGV9IGZhaWxlZCIKICBleGl0
IDEKZW5kClNDUl9FT0YKZW5kCnB1dHMgJ19fRU5EX18nCg==
RAR_EOF
begin
  output = File.open('rar.rb', 'w')
  output.write decode64(text)
  output.close
rescue
  $stderr.puts "restore of rar.rb failed"
  exit 1
end
__END__


--Tadayoshi Funaba