Skip to content

Instantly share code, notes, and snippets.

@gerarldlee
Forked from maurizi/ansible-galaxy.bat
Last active August 29, 2015 14:14
Show Gist options
  • Save gerarldlee/73566d54b0a795914799 to your computer and use it in GitHub Desktop.
Save gerarldlee/73566d54b0a795914799 to your computer and use it in GitHub Desktop.
@echo off
cygwin-shim.bat /bin/ansible-galaxy %*
@echo off
cygwin-shim.bat /bin/ansible-playbook %*
@echo off
set COMMAND=%1
REM If you used the standard Cygwin installer this will be C:\cygwin
set CYGWIN=%USERPROFILE%\.babun\cygwin
REM You can switch this to work with bash with %CYGWIN%\bin\bash.exe
set SH=%CYGWIN%\bin\zsh.exe
if not exist "%SH%" (
echo cygwin's sh.exe not found. Did you delete %CYGWIN% ?
exit /b 255
)
"%SH%" -c "[[ -x "%COMMAND%" ]]"
if not errorlevel 0 (
echo %COMMAND% not found. Did you uninstall it ?
exit /b 255
)
"%SH%" -c "%*"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment