summaryrefslogtreecommitdiff
blob: 1026b1fc10ad237aed454a6b8a79bf44963953c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/python -O
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

import os,sys
sys.path.insert(0, os.environ.get("PORTAGE_PYM_PATH", "/usr/lib/portage/pym"))

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)

import portage
portage.env_update(makelinks)