       showInformation provisioner, modal
 
 
-  runBuildScript: ->
+  runBuildScript: (inTerminal = yes)->
 
     machine = @getData()
 


    @reviveProvisioner (err, provisioner)=>

      if err or not provisioner
        return new KDNotificationView
          title : "Failed to fetch build script."

      {content: {script}} = provisioner
      script = Encoder.htmlDecode script

        file.save script, (err)=>
          return if KD.showError err

          command = "bash #{path};exit"

          if not inTerminal

            new KDNotificationView
              title: "Init script running in background..."

            machine.getBaseKite().exec { command }
              .then (res)->

                new KDNotificationView
                  title: "Init script executed"

                info  "Init script executed : ", res.stdout  if res.stdout
                error "Init script failed   : ", res.stderr  if res.stderr

              .catch (err)->

                new KDNotificationView
                  title: "Init script executed successfully"
                error "Init script failed:", err

            return

          modal = @openTerminal
            command       : command
            readOnly      : yes
            destroyOnExit : no

