Shell syntax produces error

Bug #678169 reported by Ben Beasley on 2010-11-21
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fix Released
Johannes Sasongko

Bug Description

Running the latest development version on Ubuntu 10.10, and having some issues with the fix for , checked in in r3765.

Running exaile from the terminal results in:

./exaile: 21: [[: not found

Seems that the double square bracket syntax is not recognized by Ubuntu's /bin/sh. The problem is in line 16 of the launcher shell script:

    if [[ `which python2 2> /dev/null` ]]; then

One option might be to use the backtick inside double quotes and single square brackets:

    if [ "`which python2 2> /dev/null`" ]; then

Or, we could test the return code of which:

    which python2 >& /dev/null
    if [ "$?" == 0 ]; then

Related branches

Johannes Sasongko (sjohannes) wrote :

Thanks. Your second alternative doesn't seem to work in dash, so I'm using the first.

Changed in exaile:
assignee: nobody → Johannes Sasongko (sjohannes)
importance: Undecided → Medium
milestone: none →
status: New → Fix Committed
Changed in exaile:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers