From ff95aff34e74381d9c7baaf46d9dfbc1f4289f0f Mon Sep 17 00:00:00 2001 From: octospacc Date: Thu, 29 May 2025 20:40:28 +0200 Subject: [PATCH] Fix READMEs build --- Build.sh | 4 +++- TranscludeReadmes.js | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Build.sh b/Build.sh index 8174cf5..95bbfc1 100644 --- a/Build.sh +++ b/Build.sh @@ -1,4 +1,6 @@ #!/bin/sh +set -x + SourceApps="$(ls ./source/)" HubSdkApps="${SourceApps} MatrixStickerHelper" HtmlHeadInject='' @@ -71,5 +73,5 @@ do htmltitle=''"${name}"'' htmlcanonical='' sed -i 's||'"${htmltitle}${htmlcanonical}${htmlmanifest}${HtmlHeadInject}"'|' "${htmlfile}" - node ../TranscludeReadmes.js "./${App}" + node ../TranscludeReadmes.js "${App}" done diff --git a/TranscludeReadmes.js b/TranscludeReadmes.js index 96893a0..6246c5d 100644 --- a/TranscludeReadmes.js +++ b/TranscludeReadmes.js @@ -1,11 +1,11 @@ #!/usr/bin/env node const fs = require('fs'); -const dir = require('process').argv.slice(-1)[0]; -const readme = `${dir}/README.md`; +const app = require('process').argv.slice(-1)[0]; +const readme = `../source/${app}/README.md`; if (fs.existsSync(readme)) { let index; for (const ext of ['js', 'html']) { - const path = `${dir}/index.${ext}`; + const path = `./${app}/index.${ext}`; if (fs.existsSync(path)) { index = path; break;