#!/usr/bin/env python

from pNbody import *
import shutil


# check if .pNbody exists
dest = os.path.join(HOME,'.pNbody')
if os.path.isdir(dest):
  answer = raw_input('WARNING : The directory %s alredy exists. Remove it [y/N] ? ' %(dest))	
  if answer == "y" or answer == "Y": 
    print "Removing %s"%dest
    shutil.rmtree(dest)
  else:
    print "Nothing done."  
    sys.exit()

# recursive copy
print "copying files from %s"%CONFIGDIR
print "to %s"%dest


shutil.copytree(CONFIGDIR,dest)

print "done."
print 
print "you can now type pNbody_show-path to check the new configuration."
print 
