cheat/install

13 lines
342 B
Plaintext
Raw Normal View History

#!/usr/bin/env python
from os.path import expanduser
import shutil
import sys
try:
shutil.copy('./cheat', '/usr/local/bin/')
shutil.copytree('./.cheat', expanduser('~') + '/.cheat')
print "cheat has been installed successfully."
except IOError as e:
print >> sys.stderr, "This installer must be run as root."
sys.exit(1)