title: Applescript "expected end of line but found identifier" for terminal app
body: <p>Complete noob here for <code>applescript</code>. I am wondering how to resolve following problem for the <code>applescript</code> shown below:</p>
  
  <p>I get the following error on the line <code>tell the current terminal</code>:</p>
  
  <p><a href="https://i.stack.imgur.com/99gai.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/99gai.jpg" alt="enter image description here"></a></p>
  
  <p><code>Expected end of line but identifier found</code></p>
  
  <p><a href="https://i.stack.imgur.com/i3wXa.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/i3wXa.jpg" alt="enter image description here"></a></p>
  
  <p>Here is the code for anyone wishing to try it out:</p>
  
  <pre><code>tell application "iTerm"
      make new terminal
      tell the current terminal
          activate current session
          launch session "Default Session"
          tell the last session
              write text "unset DYLD_LIBRARY_PATH ; unset LD_LIBRARY_PATH"
              write text "mkdir -p ~/.boot2docker"
              write text "if [ ! -f ~/.boot2docker/boot2docker.iso ]; then cp /usr/local/share/boot2docker/boot2docker.iso ~/.boot2docker/ ; fi"
              write text "/usr/local/bin/boot2docker init &amp;&amp; /usr/local/bin/boot2docker up &amp;&amp; $(boot2docker shellinit) &amp;&amp; docker version"
          end tell
      end tell
  end tell
  </code></pre>
  
  <p>Reference:  <a href="https://apple.stackexchange.com/questions/8299/how-do-i-make-an-applescript-file-into-a-mac-app">https://apple.stackexchange.com/questions/8299/how-do-i-make-an-applescript-file-into-a-mac-app</a></p>