gnuboot-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v1 17/18] website-build: serve.sh: remove the need for random tem


From: Denis 'GNUtoo' Carikli
Subject: [PATCH v1 17/18] website-build: serve.sh: remove the need for random temporary directory.
Date: Sat, 25 May 2024 20:25:52 +0200

Since we are migrating to haunt and that haunt builds the website in
site/ we also use that.

In addition that also simplifies the lighttpd configuration.

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
---
 website-build/.gitignore         | 3 ++-
 website-build/lighttpd.conf.tmpl | 2 +-
 website-build/serve.sh           | 9 ++++-----
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/website-build/.gitignore b/website-build/.gitignore
index 68bc85b..1954728 100644
--- a/website-build/.gitignore
+++ b/website-build/.gitignore
@@ -10,4 +10,5 @@
 /Makefile
 /Makefile.in
 /missing
-/website.tar.gz
\ No newline at end of file
+/website.tar.gz
+/site/**
diff --git a/website-build/lighttpd.conf.tmpl b/website-build/lighttpd.conf.tmpl
index ef0e98d..2ee99a2 100644
--- a/website-build/lighttpd.conf.tmpl
+++ b/website-build/lighttpd.conf.tmpl
@@ -15,7 +15,7 @@
 
 server.bind             = "localhost"
 server.port            = LIGHTTPD_PORT
-server.document-root   = "TMPDIR"
+server.document-root    = var.CWD + "/site/"
 dir-listing.activate   = "enable"
 index-file.names       = ( "index.html" )
 mimetype.assign                = (
diff --git a/website-build/serve.sh b/website-build/serve.sh
index 8b53545..4e29a69 100755
--- a/website-build/serve.sh
+++ b/website-build/serve.sh
@@ -37,13 +37,12 @@ if [ $# -eq 2 ] ; then
     lighttpd_port="$2"
 fi
 
-tmpdir="$(mktemp -d)"
-mkdir -p "${tmpdir}/software/gnuboot/"
+destdir="site/software/gnuboot/"
+mkdir -p "${destdir}"
 
-tar xf "${tarball}" -C "${tmpdir}/software/gnuboot/"
+tar xf "${tarball}" -C "${destdir}"
 
-sed -e "s#TMPDIR#${tmpdir}#g" \
-    -e "s#LIGHTTPD_PORT#${lighttpd_port}#g" \
+sed -e "s#LIGHTTPD_PORT#${lighttpd_port}#g" \
     "${basedir}/lighttpd.conf.tmpl" > \
     "${basedir}/lighttpd.conf"
 
-- 
2.41.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]