+path = require 'path'
+fs = require 'fs'
+
 module.exports = ->
   @loadNpmTasks 'grunt-shell'
 

    chrome = '/usr/bin/google-chrome'
  else if process.platform is 'darwin'
    chrome = '"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"'

  if process.platform is 'linux'
    python2 = 'cd build/tools ; grep -Rl python . | xargs sed -ri "s/([^!]|^)python(\\s|$)/\\1python2\\2/g"'

    'chrome-extension':
      command: [
        chrome
        '--pack-extension=' + path.resolve('chrome-extension/dist/tipsy')
        '--pack-extension-key=' + path.resolve('chrome-extension/key.pem')
        '--no-message-box'
      ].join(' ')

