2013-08-10 22:32:49 +02:00
|
|
|
#!/usr/bin/env python
|
2013-08-10 23:08:17 +02:00
|
|
|
from os.path import expanduser
|
2013-08-10 22:32:49 +02:00
|
|
|
import shutil
|
|
|
|
import sys
|
|
|
|
|
|
|
|
try:
|
|
|
|
shutil.copy('./cheat', '/usr/local/bin/')
|
2013-08-11 21:43:51 +02:00
|
|
|
shutil.copytree('./.cheat', expanduser('~') + '/.cheat')
|
2013-08-11 21:59:03 +02:00
|
|
|
print "cheat has been installed successfully."
|
2013-08-10 22:32:49 +02:00
|
|
|
except IOError as e:
|
|
|
|
print >> sys.stderr, "This installer must be run as root."
|
|
|
|
sys.exit(1)
|