Title: load_path for running from a different directory Post by: aktxyz on August 30, 2007, 11:30:59 AM If you add this line to the top of your s3cmd.rb, you can run the script from anywhere.
$LOAD_PATH << File.expand_path(File.dirname(__FILE__)) Also, just preference, I like to put the s3sync folder in my path, and then have aliases like this setup... alias s3lb='s3cmd.rb listbuckets' Title: Re: load_path for running from a different directory Post by: wkharold on September 09, 2007, 04:34:16 PM Nice touch. Thanks.
Attached is a mod I made to s3config.rb to look for s3config.yml in the .s3conf, $HOME/.s3conf, and /etc/s3conf directories. That way you can lock down your s3config.yml in an appropriate directory but still run the s3cmd/s3sync.rb scripts from anywhere. ... WkH Title: Re: load_path for running from a different directory Post by: mla on December 05, 2007, 02:45:35 PM That's excellent. Can we get that merged into official version?
Title: Re: load_path for running from a different directory Post by: ferrix on December 06, 2007, 04:09:45 AM I've got a handful of these contributed tweaks and so I'll try to do a nice little "ease-of-use" update this weekend if I have time.
Title: Re: load_path for running from a different directory Post by: ferrix on January 06, 2008, 09:59:57 AM If you add this line to the top of your s3cmd.rb, you can run the script from anywhere. $LOAD_PATH << File.expand_path(File.dirname(__FILE__)) Will be added today in sync and cmd; watch announcements. Title: Re: load_path for running from a different directory Post by: ferrix on January 06, 2008, 10:18:26 AM Nice touch. Thanks. Attached is a mod I made to s3config.rb to look for s3config.yml in the .s3conf, $HOME/.s3conf, and /etc/s3conf directories. That way you can lock down your s3config.yml in an appropriate directory but still run the s3cmd/s3sync.rb scripts from anywhere. ... WkH Will be added to main version today. Check announce. |