Skip to content
Browse files

gh-66 detect ycsb home using CHANGELOG

  • Loading branch information...
1 parent d870ffa commit e01068a989486639c5a1518e93679b81d40c09b7 m1ch1 committed Feb 18, 2012
Showing with 4 additions and 3 deletions.
  1. +4 −3 distribution/src/main/bin/ycsb
View
7 distribution/src/main/bin/ycsb
@@ -55,9 +55,10 @@ def find_jars(dir):
return jars
def get_ycsb_home():
- bin_dir = os.path.abspath(os.path.dirname(sys.argv[0]))
- ycsb_home = os.path.join(*([bin_dir] + [os.path.pardir] * 4))
- return os.path.abspath(ycsb_home)
+ dir = os.path.abspath(os.path.dirname(sys.argv[0]))
+ while "CHANGELOG" not in os.listdir(dir):
+ dir = os.path.join(dir, os.path.pardir)
+ return os.path.abspath(dir )
def get_command():
if len(sys.argv) < 2:

0 comments on commit e01068a

Please sign in to comment.
Something went wrong with that request. Please try again.