File: initialize_user.py

package info (click to toggle)
pms 0.2.19-2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 456 kB
  • ctags: 389
  • sloc: python: 2,655; makefile: 59; sh: 24
file content (16 lines) | stat: -rwxr-xr-x 356 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/python
import getopt, sys, os, string

config = os.path.join(os.environ['HOME'], ".pms")
try:
	os.mkdir(config)
except (IOError, OSError):
	pass
try:
	os.mkdir(os.path.join(os.environ['HOME'], ".draft"))
except (IOError, OSError):
	pass

code = os.system("(cd ./Config;tar cf - .)|(cd %s && tar xf -)" % config)
if code:
	raise SystemExit(code)