Skip to content
This repository has been archived by the owner on Apr 15, 2019. It is now read-only.

Commit

Permalink
handle case that file is a symlink
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewfallshaw committed Sep 20, 2009
1 parent c261091 commit 48b64c2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion change_tempo.rb
@@ -1,7 +1,9 @@
#!/usr/bin/env ruby

%w[rubygems activesupport appscript tempfile].each {|l| require l }
Dir[File.join(File.dirname(__FILE__), "lib", "*")].each { |l| require l }
file = __FILE__
file = File.expand_path(File.readlink(file), File.dirname(file)) while File.symlink?(file)
Dir[File.join(File.dirname(file), "lib", "*")].each { |l| require l }

if __FILE__ == $0
require 'optparse'
Expand Down

0 comments on commit 48b64c2

Please sign in to comment.