From c2b4c87fdaf36438b52e0b84cab5525f7756307b Mon Sep 17 00:00:00 2001 From: Denis 'GNUtoo' Carikli Date: Sun, 19 May 2024 15:11:24 +0200 Subject: [PATCH] website-build: serve.sh: remove the need for random temporary directory. 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 Acked-by: Adrien 'neox' Bourmault --- 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"