> I'm trying to put the next script in my local "Shutdown Items", to
> clean an backup directory, but seems like the script not running:
>
> #!/usr/bin/env newlisp
>
> (execute "rm ~/tmp/bbedit/*")
>
> The script is executable (mode 755), someone can tell me what is
> wrong?
#! scripts aren't currently supported for shutdown items. [1]
You can express that as an AppleScript (even using `do shell script`
if necessary), then save it as a compiled script in the shutdown items
folder.
[1] That feature predates Mac OS X. In the interim, I don't think
anyone has asked for #! script support.
Jim
> You think that this feature could be in a next version?.
>
> I ask this because I think this feature can open some posibilities
> like I mention in my first message.
I will log this as a feature request in our issue tracker, so we can
consider this (and its implications) for a future version.
In the meantime, it should be possible to run this scripts with a
little bit of AppleScript glue using the `do shell script` command.
(So, with a little but of up front hassle, you should have all the
same possibilities as if there were native support for #! scripts in
shutdown items.)
If you run into difficulties, please post here, and someone should be
able to offer advice.
Jim
Please have one more look at the way MPW handles shutdown items. It's just a matter of putting a file in a well defined place within MPW's main directory and MPW executes it as an MPW script. The goodbye kiss makes it all happen and there is no "logout failed because MPW failed to quit." message.
I too am tired of waking up to find that my OS neXt box didn't really shut down as I was on my way to my sleeping quarters. This OS 9.1 machine has no problems like that with MPW.
--
--> A fair tax is one that you pay but I don't <--