Merge lp:~jamesh/bindwood/conditional-chmod into lp:bindwood
Status: | Merged |
---|---|
Approved by: | James Henstridge |
Approved revision: | 37 |
Merged at revision: | 36 |
Proposed branch: | lp:~jamesh/bindwood/conditional-chmod |
Merge into: | lp:bindwood |
Diff against target: |
38 lines (+6/-7) 2 files modified
couchdb_env.sh (+1/-1) modules/desktopcouch.jsm (+5/-6) |
To merge this branch: | bzr merge lp:~jamesh/bindwood/conditional-chmod |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Manuel de la Peña (community) | Approve | ||
Eric Casteleijn (community) | Approve | ||
Review via email: mp+51860@code.launchpad.net |
Commit message
Explicitly run couchdb_env.sh under /bin/sh so we don't need to worry about whether it has the execute bit set.
Description of the change
The code to retrieve the desktopcouch environment explicitly sets the executable bit on the couchdb_env.sh file before running it.
This is done because the executable bit may have been lost if Bindwood is installed from an XPI file (which is basically just a zip archive).
Unfortunately, if the package is installed globally on the system then the user won't have the ability to change the file's permissions, and we'll hit an error. This occurs with packaged version of Bindwood in Ubuntu, so they disabled this part of the code.
This branch first checks to see if the script is executable before trying to change the permissions, which should be suitable for both packaged and XPI versions of the extension.
At Stuart's suggestion, I've updated the branch to run "/bin/sh couchdb_env.sh outfile", which gets rid of the need to worry about the permissions on the script.