开发者

Package bash script in "executable" for double-click execution (ideally platform independent)?

I wrote a number of bash scripts that greatly simplify the routine, but very tedious, file manipulat开发者_运维技巧ion that my group does.

Unfortunately, most in my group cannot open a terminal, let alone run scripts with complex arguments.

Is there a way to nicely package a bash script into an executable (that accepts arguments) that runs nicely on multiple computer platforms?

I run Mac OS X, but many of my colleagues run Windows (which can run bash scripts via Cygwin, etc.). I am aware of Platypus, but is there an equivalent for Windows?


I do not know if it meets all of your requirements but I use makeself wich is really great to package things. It works with cygwin, so it might fill in your needs ^^

Basically, when you create a makeself archive, you give a script that will be executed when the archive is "launched". This script get all the parameters given to the archive (whatever you want) :

makeself.sh ${dir_to_archive} ${name_of_archive} ${description} ${startup_script}

When you run the auto-extractible archive, you do :

my_archive.run ${param1} ${param2} ${paramN}

It will uncompress your archive and run :

${startup_script} ${param1} ${param2} ${paramN}

my2c

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜