5 changed files with 58 additions and 10 deletions
@ -1,2 +1,3 @@
@@ -1,2 +1,3 @@
|
||||
config.cfg |
||||
lighttpd-fsfe.conf |
||||
pywebserver-fsfe.log |
||||
|
@ -1,3 +1,5 @@
@@ -1,3 +1,5 @@
|
||||
# FSFE Local Build |
||||
|
||||
FUll instructions can be found in an extensive blog post: https://blog.mehl.mx/2016/build-fsfe-websites-locally/ |
||||
This is a collection of scripts and configuration files necessary to build fsfe.org websites locally. |
||||
|
||||
Full instructions can be found in an extensive blog post: https://blog.mehl.mx/2016/build-fsfe-websites-locally/ |
||||
|
@ -1,13 +1,29 @@
@@ -1,13 +1,29 @@
|
||||
### BUILD DIRECTORIES ### |
||||
|
||||
# SVN trunk directory (repository with XHTML source files) |
||||
LOC_trunk=~/subversion/fsfe/fsfe-web/trunk |
||||
|
||||
# Directory in which the result of the build process (html files) will be saved |
||||
LOC_out=~/subversion/fsfe/local-build/fsfe.org |
||||
|
||||
# Path to lighttpd config file (default: points to a file in the same directory as the script) |
||||
HTTPD_conf=$ROOT/lighttpd-fsfe.conf |
||||
|
||||
# Directory of the secondary SVN directory with which you made a first full build. |
||||
# Avoids having some generated files in your clean trunk. |
||||
# Default: Leave empty if you just want to use one SVN source directory |
||||
# Default: Leave empty if you just want to use one SVN source directory (recommended) |
||||
LOC_trunk_dev= |
||||
|
||||
|
||||
### LOCAL WEBSERVER ### |
||||
|
||||
# Choose your local webserver. |
||||
# Default is "python" which is python's inbuilt http server that is available on most distributions |
||||
# Use "lighttpd" if you want to use the Lighttpd webserver. This has to be configured manually (see guide) |
||||
HTTPD=python |
||||
|
||||
# Choose on which port the webserver runs. This has no effect for "lighttpd". |
||||
HTTPD_port=5080 |
||||
|
||||
# If you use other webservers like "lighttpd", this is the path to its config file |
||||
# Default: points to a lighttpd config file in the same directory as the script |
||||
# Has no effect if you use the "python" webserver |
||||
HTTPD_conf=$ROOT/lighttpd-fsfe.conf |
||||
|
||||
|
@ -0,0 +1,15 @@
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env python3 |
||||
|
||||
import http.server |
||||
import socketserver |
||||
import os |
||||
import sys |
||||
|
||||
WEB_DIR = sys.argv[1] |
||||
WEB_PORT = int(sys.argv[2]) |
||||
|
||||
os.chdir(WEB_DIR) |
||||
|
||||
Handler = http.server.SimpleHTTPRequestHandler |
||||
httpd = socketserver.TCPServer(("", WEB_PORT), Handler) |
||||
httpd.serve_forever() |
Loading…
Reference in new issue