#!/usr/bin/env python

from pNbody import *
import shutil


EXAMPLES=os.path.join(PNBODYPATH,'examples')


dest = os.path.join(HOME,"pnbody_examples")


# check if .pNbody exists
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"%EXAMPLES
print "to %s"%dest


shutil.copytree(EXAMPLES,dest)

print "done."
print 
print "you can now move to %s and test the examples."%dest
print 
