Initial commit
This commit is contained in:
42
wakeboard
Executable file
42
wakeboard
Executable file
@@ -0,0 +1,42 @@
|
||||
#!/bin/bash
|
||||
|
||||
WAKEBOARD_TITLE="Wakeboard"
|
||||
PORT=8000
|
||||
|
||||
while [[ $# -gt 0 ]]; do
|
||||
key="$1"
|
||||
case $key in
|
||||
-h|--help)
|
||||
HELP=1
|
||||
shift
|
||||
;;
|
||||
-p|--port)
|
||||
PORT="$2"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
-t|--title)
|
||||
WAKEBOARD_TITLE="$2"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ "$HELP" ]; then
|
||||
echo "Usage: $0 [-h|--help] [-t|--title <title>] [-p|--port <port>]"
|
||||
echo " -h | --help: Show this help"
|
||||
echo " -t | --title: Title to give to the served page (defaults to Wakeboard)"
|
||||
echo " -p | --port <port>: Port number to use (default 8000)"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ ! -d "status" ]; then
|
||||
mkdir "status"
|
||||
fi
|
||||
|
||||
# Ensure variable can be read by the get handler
|
||||
export WAKEBOARD_TITLE
|
||||
|
||||
./bashserv/bashserv.sh -s "./static" -g "./handle_get.sh" -p "$PORT"
|
||||
|
||||
Reference in New Issue
Block a user