From: Keith M. <kei...@us...> - 2012-10-18 20:44:07
|
On 18/10/12 20:13, Renato Silva wrote: > Thanks! yes, I like the link idea... Yes it is NTFS, but wouldn't symlinks > work too? I'm sure they would, but hard links are cheaper, and they don't require... > Windows 7 supports them out-of-the-box, while in XP I think I can > use Link Shell Extension ( >http://schinagl.priv.at/nt/hardlinkshellext/hardlinkshellext.html#symboliclinksforwindowsxp > ). ...any such support from the operating system, (nor from any add-on). OTOH, hard links can only be used with physical disk files, and they cannot span devices, (neither of which represents a problem in the scenario under discussion). > IIRC it is possible to get symlink name from a linked script (that > is, to determine which command to call in the wrapper). You can infer the name of the command from the link name itself; something along the lines of: #!/bin/sh CMD=`basename "$0"` $CMD.exe "$@" or, if you need to insert a command specific path: #!/bin/sh CMD=`basename "$0"` case $CMD in bzr) /path/to/$CMD.exe "$@" ;; ... esac should do the trick, for either hard links or for symlinks. -- Regards, Keith. |