From 7f4ea8d1964122ebeafca06a8f7f881d10732238 Mon Sep 17 00:00:00 2001 From: Elijah Perrault Date: Mon, 21 Mar 2011 10:03:48 -0600 Subject: [PATCH] Added a (not so thoroughly tested) Batch file for management of Auto. --- auto.bat | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 auto.bat diff --git a/auto.bat b/auto.bat new file mode 100644 index 0000000..cc816bd --- /dev/null +++ b/auto.bat @@ -0,0 +1,45 @@ +:: auto.bat - Launcher for Microsoft Windows. +:: Copyright (C) 2010-2011 Xelhua Development Group, et al. +:: Released under the terms stated in doc/LICENSE. +:: Clone of `auto`, since Windows likes Batch, not sh. + +@echo off + +set pidfile=bin/auto.pid + +if "%1" == "" goto errparams +if "%1" == "start" goto start +if "%1" == "status" goto status +else goto errparams + +:errparams +echo. +echo Usage: auto.bat (start|status) [force] +:end + +:start +echo. +if exist "%pidfile" ( + if "%2" == "force" ( + echo Starting Auto. . . + perl bin/auto + ) + else ( + echo Auto appears to be running already. Run `auto.bat start force` to start anyway. + ) +) +else ( + echo Starting Auto. . . + perl bin/auto +) +:end + +:status +echo. +if exist "%pidfile" ( + echo Status: Auto appears to be running. +) +else ( + echo Status: Auto appears to not be running. +) +:end