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;