Jump to content

Ghostbiscuit

Members
  • Posts

    2
  • Joined

  • Last visited

Posts posted by Ghostbiscuit

  1. Wheatstraw.. Thanks for the input. The oascript works fine. For some reason though I cannot get the first part of the script to work. When I run the script I get this.

    if: bad interpreter: No such file or directory

    Could you make sure you pandora.sh script has EXACTLY the following? I've tested this script on both 10.3 and 10.4 and it works.

    pandora.sh

    #!/bin/bash
    
    port=$1
    
    if [ ! $port ]; then
    
            port=8085
    
    fi
    
    export TEMP=`echo ~`/Library/Caches/TemporaryItems
    
    java -jar pandora.jar $port&
    
    
    
    # make sure java has enough time to launch
    
    sleep 5
    
    osascript -e "tell application "Firefox"" -e "Get URL "http://localhost:$port"" -e "end tell"

    Ahh. So if I have

    #!/bin/bash

    It gives that error. If I do

     #!/bin/bash

    I do not get the error. Only Difference is the space before #. But it still doesnt work. Just does nothing. I get no error, but it just sits there. I am using OS X 10.4.6 on a Macbook.

    Check you line endings - Make sure you are using LF (unix) and not CRLF (windows)

×
×
  • Create New...