forgot to use absolute paths in the install script; fixed now

This commit is contained in:
nebukadnezzar 2013-08-12 01:55:41 +02:00
parent 67cb9c10d4
commit 824e3dd99c
1 changed files with 4 additions and 3 deletions

View File

@ -6,12 +6,13 @@ import shutil
import sys
home = os.path.expanduser('~')
bindir = os.path.join(home, '/bin/')
thisdir = os.path.dirname(os.path.abspath(__file__))
bindir = os.path.join(home, 'bin')
try:
if not os.path.isdir(bindir):
os.path.mkdir(bindir)
os.symlink('./cheat', bindir)
os.symlink('./.cheat', os.path.join(home, '/.cheat'))
os.symlink(os.path.join(thisdir, './cheat'), os.path.join(bindir, 'cheat'))
os.symlink(os.path.join(thisdir, './.cheat'), os.path.join(home, '.cheat'))
print("cheat has been installed successfully.")
except IOError as e:
sys.stderr.write("Something went wrong: %s\n" % e)