HomeApplefinder - Making an utility bundle open a file

finder – Making an utility bundle open a file


I’ve a quite simple Mac utility bundle which is mainly a wrapper round Spyder. I’m attempting to get it to open .py recordsdata.

Right here is the whole lot of the appliance listing

.
./Contents
./Contents/MacOS
./Contents/MacOS/Spyder
./Contents/Information.plist

Right here is Information.plist

<?xml model="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist model="1.0">
<dict>
    <key>CFBundleExecutable</key>
    <string>Spyder</string>
    <key>CFBundleName</key>
    <string>Spyder</string>
</dict>
</plist>

And right here is Spyder

#!/usr/bin/env bash

echo "Launching Spyder with file: $@" > /tmp/spyderlog
supply ~/.profile
/Customers/mike/.scripts/launch-spyder "$@" >> /tmp/spyderlog

Sadly, if I attempt to use this utility to open some .py file, it would not seem like the filename is handed into my Spyder executable in any respect: $@ is all the time clean.

How on Earth do you get Finder to ship the filename into the executable?

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments