Created
January 23, 2014 16:21
-
-
Save jamesoff/8581559 to your computer and use it in GitHub Desktop.
Teach s3cmd to look in environment for location of its config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- s3cmd.orig 2014-01-23 15:52:08.000000000 +0000 | |
+++ s3cmd 2014-01-23 15:56:12.000000000 +0000 | |
@@ -1692,7 +1692,9 @@ | |
#optparser.disable_interspersed_args() | |
config_file = None | |
- if os.getenv("HOME"): | |
+ if os.getenv("S3CFG"): | |
+ config_file = os.getenv("S3CFG") | |
+ elif os.getenv("HOME"): | |
config_file = os.path.join(os.getenv("HOME"), ".s3cfg") | |
elif os.name == "nt" and os.getenv("USERPROFILE"): | |
config_file = os.path.join(os.getenv("USERPROFILE").decode('mbcs'), "Application Data", "s3cmd.ini") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment