Skip to content

Instantly share code, notes, and snippets.

@bruceLee-kungFu
Created June 11, 2016 11:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bruceLee-kungFu/af478c065481e51c8f5760f570f1d73b to your computer and use it in GitHub Desktop.
Save bruceLee-kungFu/af478c065481e51c8f5760f570f1d73b to your computer and use it in GitHub Desktop.
command = "pwd"
$pwd = %x[#{command}]
puts $pwd
if ($pwd =~ /^(\/.*)\/.*?\/.*?$/) # get rid of the trailing two directories
$path_to_loading_file = $1 + "/lib_crawler/lib_crawler.rb"
end
load $path_to_loading_file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment