This is a crazy hack!!!
http://www.macosxhints.com/article.php?story=20060425140531375
How to have the same file contain both a shell script and a compiled AppleScript
% /usr/bin/osacompile -o shebang.scpt
on run argv
argv
end run
^D
% chmod +x shebang.scpt
% echo \#\!'/usr/bin/osascript' > shebang.scpt
% ./shebang.scpt a b c
a, b, c
This puts a compiled applescript in the resource fork and a shell script in the data fork... mind exploded!
No comments:
Post a Comment