Skip to content

Instantly share code, notes, and snippets.

@hoodja
Last active December 14, 2015 07:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hoodja/5047992 to your computer and use it in GitHub Desktop.
Save hoodja/5047992 to your computer and use it in GitHub Desktop.
On a windows-base slave, translate the workspace path to unix style ('\' ==> '/') for use in MinGW commands
:: assumes MinGW exists on system so echo and sed are available
:: TODO: perhaps attempt to rework with magic variable expansion built-in to the Windows shell
:: this format is for file-based execution
:: if you are attempting to run this on the command line, %%i should be %i instead (thanks Microsoft :/)
FOR /F "tokens=*" %%i in ('echo %WORKSPACE%^| sed -e ''s/\\/\//g''') do SET MinGW_JENKINS_WORKSPACE=%%i
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment