[Pkg-javascript-commits] [sockjs-client] 66/434: Recompile on modification (make serve)
Tonnerre Lombard
tonnerre-guest at moszumanska.debian.org
Wed Jan 8 00:47:02 UTC 2014
This is an automated email from the git hooks/post-receive script.
tonnerre-guest pushed a commit to branch master
in repository sockjs-client.
commit bbda223678f580ea89d4ebb13e7ee16a3ea68f13
Author: Marek Majkowski <majek04 at gmail.com>
Date: Wed Aug 10 16:27:31 2011 +0100
Recompile on modification (make serve)
---
Makefile | 19 +++++++++++++++++++
test.sh | 23 -----------------------
2 files changed, 19 insertions(+), 23 deletions(-)
diff --git a/Makefile b/Makefile
index 30c1ab4..5253efb 100644
--- a/Makefile
+++ b/Makefile
@@ -22,3 +22,22 @@ tests/html/lib/tests.js: tests/html/src/tests.coffee
test: tests
tests: tests/html/lib/sockjs.js tests/html/lib/tests.js
node tests/server.js
+
+
+serve:
+ @if [ -e .pidfile.pid ]; then \
+ kill `cat .pidfile.pid`; \
+ rm .pidfile.pid; \
+ fi
+
+ @while [ 1 ]; do \
+ echo " [*] Running http server"; \
+ make test & \
+ SRVPID=$$!; \
+ echo $$SRVPID > .pidfile.pid; \
+ echo " [*] Server pid: $$SRVPID"; \
+ inotifywait -r -q -e modify .; \
+ kill `cat .pidfile.pid`; \
+ rm -f .pidfile.pid; \
+ sleep 0.1; \
+ done
diff --git a/test.sh b/test.sh
deleted file mode 100755
index bba391f..0000000
--- a/test.sh
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-if [ -e .pidfile.pid ]; then
- kill `cat .pidfile.pid`
- rm .pidfile.pid
-fi
-
-while [ 1 ]; do
- while [ 1 ]; do
- echo " [*] Running http server"
- make tests &
- SRVPID=$!
- echo $SRVPID > .pidfile.pid
-
- echo " [*] Server pid: $SRVPID"
- break
- done
-
- inotifywait -r -q -e modify .
- kill $SRVPID
- rm -f .pidfile.pid
- # Sync takes some time, wait to avoid races.
- sleep 0.1
-done
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/sockjs-client.git
More information about the Pkg-javascript-commits
mailing list