blob: b245b39905d8f5438d19ae0e08b8da7c868e57b3 [file] [log] [blame]
#!/usr/bin/python -O
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
import os,sys
def usage(status):
print "Usage: env-update [--no-ldconfig]"
print ""
print "See the env-update(1) man page for more info"
sys.exit(status)
if "-h" in sys.argv or "--help" in sys.argv:
usage(0)
makelinks=1
if "--no-ldconfig" in sys.argv:
makelinks=0
sys.argv.pop(sys.argv.index("--no-ldconfig"))
if len(sys.argv) > 1:
print "!!! Invalid command line options!\n"
usage(1)
try:
import portage
except ImportError:
sys.path.insert(0, "/usr/lib/portage/pym")
import portage
portage.env_update(makelinks)