Skip to content

Commit

Permalink
msi: use / as path separator
Browse files Browse the repository at this point in the history
See fluent/fluentd#1138

Signed-off-by: Kentaro Hayashi <hayashi@clear-code.com>
  • Loading branch information
kenhys committed Jun 29, 2023
1 parent 00c2e28 commit 25ac1ff
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions fluent-package/msi/assets/fluentd.bat
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,24 @@ if "%~nx0" == "td-agent.bat" (
set FLUENT_PACKAGE_TOPDIR=%~dp0
set TD_AGENT_TOPDIR=%~dp0..\td-agent
)

@rem Convert path separator from backslash to forwardslash
setlocal enabledelayedexpansion
set FLUENT_PACKAGE_TOPDIR="FLUENT_PACKAGE_TOPDIR=!FLUENT_PACKAGE_TOPDIR:\=/!"
set TD_AGENT_TOPDIR="TD_AGENT_TOPDIR=!TD_AGENT_TOPDIR:\=/!"
endlocal

set PATH=%FLUENT_PACKAGE_TOPDIR%bin;%PATH%
set PATH=%FLUENT_PACKAGE_TOPDIR%;%PATH%
set FLUENT_CONF=%TD_AGENT_TOPDIR%\etc\td-agent\td-agent.conf
set FLUENT_PLUGIN=%TD_AGENT_TOPDIR%\etc\td-agent\plugin
set FLUENT_PACKAGE_VERSION=%FLUENT_PACKAGE_TOPDIR%\bin\fluent-package-version.rb
set FLUENT_CONF=%TD_AGENT_TOPDIR%/etc/td-agent/td-agent.conf
set FLUENT_PLUGIN=%TD_AGENT_TOPDIR%/etc/td-agent/plugin
set FLUENT_PACKAGE_VERSION=%FLUENT_PACKAGE_TOPDIR%/bin/fluent-package-version.rb
for %%p in (%*) do (
if "%%p"=="--version" (
ruby "%FLUENT_PACKAGE_VERSION%"
goto last
)
)
"%FLUENT_PACKAGE_TOPDIR%\bin\fluentd" %*
"%FLUENT_PACKAGE_TOPDIR%/bin/fluentd" %*

:last

0 comments on commit 25ac1ff

Please sign in to comment.