comparison presen/serve.sh @ 10:5c57e35e19b6

add presen
author sugi
date Tue, 23 Apr 2013 23:31:26 +0900
parents
children
comparison
equal deleted inserted replaced
9:e17bc730af1a 10:5c57e35e19b6
1 #!/bin/bash
2 #
3 # Starts a basic web server on the port specified.
4 #
5 # ./serve.sh 3000 -> http://localhost:3000
6 #
7 # Copyright 2012 Eric Bidelman <ebidel@gmail.com>
8
9 port=$1
10 if [ $# -ne 1 ]
11 then
12 port=8000
13 fi
14
15 if [ $(uname -s) == "Darwin" ]
16 then
17 open=open
18 else
19 open=xdg-open
20 fi
21
22 $open http://localhost:$port/template.html && python -m SimpleHTTPServer $port;