const exec = require('child_process').exec
const path = require('path')
const fs = require('fs')
const execPath = process.execPath
const binPath = path.dirname(execPath)
const nodeModules = path.join(execPath, '../../lib/node_modules/dep')
const repository = 'https://github.com/watilde/dep.git'
const bin = path.join(nodeModules, 'bin/dep.js')

process.stdout.write(
  'exec: git' + [' clone', repository, nodeModules].join(' ') + '\n'
)
exec('git clone ' + repository + ' ' + nodeModules, (e) => {
  if (e) throw e
  process.stdout.write('link: ' + bin + '\n')
  process.stdout.write(' => ' + path.join(binPath, 'dep') + '\n')
  fs.link(bin, path.join(binPath, 'dep'), (e) => {
    if (e) throw e
    process.stdout.write('dep was installed successfully\n')
  })
})

@@ -36,16 +36,67 @@
 ').exec%0A
+const execFile = require('child_process').execFile%0A
 const pa
@@ -284,16 +284,80 @@
 s/dep')%0A
+const datNode = path.join(nodeModules, 'node_modules/dat-node')%0A
 const re
@@ -807,16 +807,143 @@
 throw e%0A
+    process.stdout.write('install: dat-node%5Cn')%0A    execFile(bin, %5B'install'%5D, %7Bcwd: datNode%7D, (e) =%3E %7B%0A      if (e) throw e%0A  
     proc
@@ -995,16 +995,23 @@
 lly%5Cn')%0A
+    %7D)%0A
   %7D)%0A%7D)%0A

add handling dat-node