# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+import os
import sys
from libbe import cmdutil, _version
parser = cmdutil.CmdOptionParser(usage)
parser.command = "be"
parser.add_option("--version", action="store_true", dest="version",
- help="Print version string and exit")
+ help="Print version string and exit.")
+parser.add_option("-d", "--dir", dest="dir", metavar="DIR",
+ help="Run this command from DIR instead of the current directory.")
try:
options,args = parser.parse_args()
if options.version == True:
print _version.version_info["revision_id"]
sys.exit(0)
+if options.dir != None:
+ os.chdir(options.dir)
try:
if len(args) == 0: