#!/usr/bin/env ruby require 'fileutils' if ARGV.include?('--dry-run') include FileUtils::DryRun else include FileUtils::Verbose end bin_dir = File.expand_path(File.dirname(__FILE__)) chmod 0755, Dir["#{bin_dir}/*"] path_command = "export PATH=`ls -dt --color=never /usr/lib/ruby/gems/1.8/gems/svn-command* | head -n1`/bin:$PATH" system "grep gems/svn-command ~/.bash_profile || " + "echo '#{path_command}' >> ~/.bash_profile"