Skip to content

Instantly share code, notes, and snippets.

@renestalder
Created June 22, 2015 07:38
Show Gist options
  • Save renestalder/6786d144655db47d4dd2 to your computer and use it in GitHub Desktop.
Save renestalder/6786d144655db47d4dd2 to your computer and use it in GitHub Desktop.
@echo off
setlocal EnableDelayedExpansion
set fileDir=%~f1
if exist "%fileDir%\config.rb" goto :build
:search
for /r "tokens=* delims=;" %%F in ("%fileDir%\..") do if not exist "%fileDir%\config.rb" (
if "%fileDir%" neq "%%~fF" (
set "fileDir=%%~fF"
goto :search
) else (
set "fileDir="
goto :build
)
)
:build
if not defined fileDir (
echo [ERROR] config.rb not found.
) else (
compass compile '%fileDir%' --boring
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment