##// END OF EJS Templates
test-serve: replace copy/paste with shell function
Patrick Mezard -
r6300:874ca958 default
parent child Browse files
Show More
@@ -1,5 +1,15 b''
1 #!/bin/sh
1 #!/bin/sh
2
2
3 hgserve()
4 {
5 hg serve -a localhost -p $HGPORT1 -d --pid-file=hg.pid -v $@ \
6 | sed -e 's/:[0-9][0-9]*//g' -e 's/localhost\.localdomain/localhost/'
7 cat hg.pid >> "$DAEMON_PIDS"
8 sleep 1
9 kill `cat hg.pid`
10 sleep 1
11 }
12
3 hg init test
13 hg init test
4 cd test
14 cd test
5
15
@@ -14,38 +24,16 b' if [ -f access.log ]; then'
14 fi
24 fi
15
25
16 echo % With -v
26 echo % With -v
17 hg serve -a localhost -p $HGPORT1 -d --pid-file=hg.pid -v \
27 hgserve
18 | sed -e 's/:[0-9][0-9]*//g' -e 's/localhost\.localdomain/localhost/'
19 cat hg.pid >> "$DAEMON_PIDS"
20 sleep 1
21 kill `cat hg.pid`
22 sleep 1
23
28
24 echo % With --prefix foo
29 echo % With --prefix foo
25 hg serve -a localhost -p $HGPORT1 -d --pid-file=hg.pid -v --prefix foo \
30 hgserve --prefix foo
26 | sed -e 's/:[0-9][0-9]*//g' -e 's/localhost\.localdomain/localhost/'
27 cat hg.pid >> "$DAEMON_PIDS"
28 sleep 1
29 kill `cat hg.pid`
30 sleep 1
31
31
32 echo % With --prefix /foo
32 echo % With --prefix /foo
33 hg serve -a localhost -p $HGPORT1 -d --pid-file=hg.pid -v --prefix /foo \
33 hgserve --prefix /foo
34 | sed -e 's/:[0-9][0-9]*//g' -e 's/localhost\.localdomain/localhost/'
35 cat hg.pid >> "$DAEMON_PIDS"
36 sleep 1
37 kill `cat hg.pid`
38 sleep 1
39
34
40 echo % With --prefix foo/
35 echo % With --prefix foo/
41 hg serve -a localhost -p $HGPORT1 -d --pid-file=hg.pid -v --prefix foo/ \
36 hgserve --prefix foo/
42 | sed -e 's/:[0-9][0-9]*//g' -e 's/localhost\.localdomain/localhost/'
43 cat hg.pid >> "$DAEMON_PIDS"
44 sleep 1
45 kill `cat hg.pid`
46 sleep 1
47
37
48 echo % With --prefix /foo/
38 echo % With --prefix /foo/
49 hg serve -a localhost -p $HGPORT1 -d --pid-file=hg.pid -v --prefix /foo/ \
39 hgserve --prefix /foo/
50 | sed -e 's/:[0-9][0-9]*//g' -e 's/localhost\.localdomain/localhost/'
51 cat hg.pid >> "$DAEMON_PIDS"
General Comments 0
You need to be logged in to leave comments. Login now