News : The level of daily SPAM has reached insane proportions, all registrations are now manual. I ask you to send me an e-mail (john (at) murga (dot) org), to confirm that you want me to create an account for you.


Post Reply  Post Thread 
[WIP] MurgaLua Reference Tool
Author Message
mikshaw
Senior Member
****


Posts: 522
Group: Registered
Joined: Apr 2007
Status: Offline
Reputation: 5
Post: #1
RE: [WIP] MurgaLua Reference Tool - a little help?

Quote:
When executing "murgaLua widget.lua" you have an offeset of +1

I had no idea. I thought arg[0] *always* returned the path to the script, but I guess if the script is called as an argument to the mugaLua command it would be arg[1]. Thanks for that info. I'll have to look into it further, because I really would like to keep it so it could be run from any directory without needing to manually edit the demo_appdir variable.

Quote:
why not using #! is, when downloading and extracting to any directory, you have no execute rights for widget.lua.
This can be handled by an installer script only

This shouldn't be the case if its extracted with permissions intact. If your permissions are changed when extracting a file onto a POSIX system (linux/unix/osx), you can quickly fix it by chmodding the file +x for owner (you). All the other files included with the package do not need more than read permission.
I have a "keep it simple" mentality when it comes to distributing files. In other words, I see no reason for installer scripts for anything I make. They are simple tar.gz archives. On linux, the customs of using #!/path/to/interpreter and of making sure executable files are indeed set to be executable are widely practiced, and I have no desire to change that, since it works well.

The only thing I plan to change in this area is to hopefully make it so running the script itself and running it as an argument to the murgaLua command will result in the same behavior.

08-20-2007 10:31 AM
Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

Messages In This Thread
[WIP] MurgaLua Reference Tool - mikshaw - 07-10-2007, 05:00 PM
RE: [WIP] MurgaLua Reference Tool - a little help? - mikshaw - 08-20-2007 10:31 AM

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump: