mirror of
https://github.com/cheat/cheat.git
synced 2024-11-23 22:41:35 +01:00
13 lines
333 B
Plaintext
13 lines
333 B
Plaintext
|
#!/usr/bin/env python
|
||
|
from os.path import expanduser
|
||
|
import shutil
|
||
|
import sys
|
||
|
|
||
|
try:
|
||
|
shutil.rmtree(expanduser('~') + '/.cheat')
|
||
|
shutil.copytree('./.cheat', expanduser('~') + '/.cheat')
|
||
|
print "cheats have been updated successfully."
|
||
|
except IOError as e:
|
||
|
print >> sys.stderr, "This updater must be run as root."
|
||
|
sys.exit(1)
|