Skip to content

Instantly share code, notes, and snippets.

@Komosa
Last active February 16, 2016 14:51
Show Gist options
  • Save Komosa/1c56d89fc8e8bb7d0b52 to your computer and use it in GitHub Desktop.
Save Komosa/1c56d89fc8e8bb7d0b52 to your computer and use it in GitHub Desktop.
"Remote" execution of commands on windows with ssh-over-cygwin access
:loop
if exist remote.done (
timeout 2
goto loop
)
call remote.recipe.bat
goto loop
THIS FILE SHOULD EXIST ON CLEAN CHECKOUT
Prevent windows script from start without supervisor
After clean checkout when `remote.done' file is not present
and windows script will be started first (as is supposed to be)
then gradle will be run without control.
Creting such file will prevent this behaviour.
call gradlew.bat :make 1>remote.out 2>remote.err
if errorlevel 1 (
echo Failure > remote.done
) else (
echo Success > remote.done
)
#!/bin/bash
rm remote.{err,out,done} 2>/dev/null
tail -F -n100 remote.out &
tailpid=$!
while [ ! -f remote.done ]
do
sleep 1
done
kill $tailpid
echo "Done, status:"
cat remote.done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment