This repository has been archived by the owner on Dec 16, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
cset
executable file
·47 lines (36 loc) · 1.72 KB
/
cset
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/usr/bin/env python
__copyright__ = """
Copyright (C) 2007-2010 Novell Inc.
Author: Alex Tsariounov <alext@novell.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
---------------------------------------------------------------------
Substrate code and ideas taken from the excellent stgit 0.13, see
https://gna.org/projects/stgit and http://www.procode.org/stgit/
Stacked GIT is under GPL V2 or later.
---------------------------------------------------------------------
"""
import sys, os
# Try to detect where it is run from and set prefix and the search path.
# It is assumed that the user installed cpuset using the --prefix= option
prefix, bin = os.path.split(sys.path[0])
if bin == 'bin' and prefix != sys.prefix:
sys.prefix = prefix
sys.exec_prefix = prefix
major, minor = sys.version_info[0:2]
local_path = [os.path.join(prefix, 'lib', 'python'),
os.path.join(prefix, 'lib', 'python%s.%s' % (major, minor)),
os.path.join(prefix, 'lib', 'python%s.%s' % (major, minor),
'site-packages')]
sys.path = local_path + sys.path
from cpuset.main import main
if __name__ == '__main__':
main()