Created
January 5, 2016 08:16
-
-
Save giseongeom/d986db746dad8ec8a66a to your computer and use it in GitHub Desktop.
cygwin 계열들의 rebase 작업 스크립트
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
IF #%1# == ## ( | |
GOTO :usage | |
) ELSE ( | |
GOTO :selection | |
) | |
:selection | |
IF /I %1 == cygwin GOTO :cygwin | |
IF /I %1 == cygwin64 GOTO :cygwin64 | |
IF /I %1 == msys32 GOTO :msys32 | |
IF /I %1 == msys64 GOTO :msys64 | |
echo. | |
echo Please enter correct argument. | |
echo. | |
GOTO :usage | |
:cygwin | |
call :shared | |
IF %ERRORLEVEL% NEQ 0 GOTO :EOF | |
c:\cygwin\bin\dash.exe -c '/usr/bin/rebaseall' | |
goto :done | |
:cygwin64 | |
call :shared | |
IF %ERRORLEVEL% NEQ 0 GOTO :EOF | |
c:\cygwin64\bin\dash.exe -c '/usr/bin/rebaseall' | |
goto :done | |
:msys32 | |
call :shared | |
IF %ERRORLEVEL% NEQ 0 GOTO :EOF | |
c:\msys32\usr\bin\dash.exe -c '/usr/bin/rebaseall' | |
goto :done | |
:msys64 | |
call :shared | |
IF %ERRORLEVEL% NEQ 0 GOTO :EOF | |
c:\msys64\usr\bin\dash.exe -c '/usr/bin/rebaseall' | |
goto :done | |
:shared | |
(tasklist /nH /FI "IMAGENAME eq bash.exe" | findstr /i bash.exe > nul) && echo "bash is aleady running, canceling rebaseall...." && exit /b 255 | |
echo. | |
echo. step1. rebaseall in progress ........... | |
exit /b 0 | |
:done | |
echo. | |
echo. step2. rebaseall completed ............. | |
echo. | |
goto :EOF | |
:usage | |
echo --------------------------------------------------------------------- | |
echo # Filename: %0 | |
echo # Usage: %0 ^(cygwin^|cygwin64^|msys32^|msys64^) | |
echo # | |
echo --------------------------------------------------------------------- | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Usage)