code: def install_hook(path):
      
      git = op.join(path, '.git', 'hooks')
      hg = op.join(path, '.hg')
      if op.exists(git):
          install_git(git)
          LOGGER.warn('Git hook has been installed.')
  
      elif op.exists(hg):
          install_hg(hg)
          LOGGER.warn('Mercurial hook has been installed.')
  
      else:
          LOGGER.error('VCS has not found. Check your path.')
          sys.exit(1)
docs: Auto definition of SCM and hook installation.