Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix lib path issue, add slash to gem source
- Loading branch information
Miron Cuperman
committed
Nov 28, 2009
1 parent
a068cff
commit fd227c5
Showing
11 changed files
with
49 additions
and
37 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
*-stamp | ||
*.substvars | ||
*.log | ||
*.pyc |
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
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
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
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
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
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
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
This file was deleted.
Oops, something went wrong.
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import sys | ||
import os | ||
from optparse import SUPPRESS_HELP | ||
|
||
def shell_complete(option, opt, value, parser): | ||
for option in parser.option_list: | ||
for flag in str(option).split('/'): | ||
if option.help != SUPPRESS_HELP: | ||
print "(-)%s[%s]"%(flag, option.help) | ||
exit(0) | ||
|
||
def optparser_extend(parser): | ||
parser.add_option ("", "--shell-complete", action="callback", | ||
callback=shell_complete, | ||
help=SUPPRESS_HELP | ||
) | ||
|
||
def find_command(command): | ||
command = "gitian-" + command | ||
progdir = os.path.dirname(sys.argv[0]) | ||
found_dir = None | ||
for dir in [os.path.join(progdir, "../lib"), "/usr/lib/gitian"]: | ||
if os.access(os.path.join(dir, command), os.F_OK): | ||
found_dir = dir | ||
break | ||
if found_dir is None: | ||
print>>sys.stderr, "installation problem - could not find subcommand %s"%(command) | ||
exit(1) | ||
return os.path.join(found_dir, command) | ||
|