[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: A Lua script and a Bash script in one file
- From: steve donovan <steve.j.donovan@...>
- Date: Tue, 8 May 2012 19:11:28 +0200
On Tue, May 8, 2012 at 6:57 PM, Egor Skriptunoff
<egor.skriptunoff@gmail.com> wrote:
> Unfortunately, this option ignores path specified by user.
> Manually entered command line "utils\hello one two three" will not work.
%~f0 seems to do the job: real cartoon swearing
::START::--[[
@lua52 %~f0 %* && @exit /b
]]
print 'hello dammit'
C:\Users\steve\lua>t1
hello dammit
C:\Users\steve\lua>t1.bat
hello dammit
C:\Users\steve\lua>\users\steve\lua\t1
hello dammit
C:\Users\steve\lua>\users\steve\lua\t1.bat
hello dammit
(see here for the fascinating arcane world of Windows shell variable expansion:
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/percent.mspx?mfr=true
)
steve d.