diff --git a/Bootstrap.sh b/Bootstrap.sh index a9bf588..4553b8c 100644 --- a/Bootstrap.sh +++ b/Bootstrap.sh @@ -1 +1,29 @@ #!/bin/bash + +# Export all tiddlers from the specific path of the HTML wiki +tiddlywiki \ + --verbose \ + --load ./public/index.html \ + --output ./Output.tmp \ + --save "[prefix[$:/OcttKB/Repo/]]" + +# Move the exported folder to a better location +mv ./Output.tmp/\$_/OcttKB/Repo ./Repo.tmp + +# Rename all extracted file to have a correct extension (remove forced .txt suffix) +# Don't filter for just .sh files anymore as we have other kinds of files +cd ./Repo.tmp +for File in *.txt +do + mv "$File" "${File/.txt}" +done +cd .. + +# Move the files of this repo to overwrite the extracted ones, then move everything back +# This is so, if present, files from the repo are preferred, if needed in case of emergency +mv ./Repo/* ./Repo.tmp/ +mv ./Repo.tmp/* ./Repo/ + +# Move everything to the working directory, ready for the next CI steps +mv ./Repo/* ./ +chmod +x *.sh *.py || true diff --git a/Wiki-OcttKB/tiddlers/System/$__OcttKB_Repo_GitLab.Main.sh.txt b/Wiki-OcttKB/tiddlers/System/$__OcttKB_Repo_GitLab.Main.sh.txt deleted file mode 100644 index 5a2312c..0000000 --- a/Wiki-OcttKB/tiddlers/System/$__OcttKB_Repo_GitLab.Main.sh.txt +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -sh ./Main.sh -sh ./SetupGitProfile.sh || true -CommitCheck="$(git log -1 --pretty=%B)" -CommitMsg0="OcttKB Cross-Repo Sync" -[ "$CommitCheck" != "$CommitMsg0 (HTML to Raw)" ] && [ "$CommitCheck" != "$CommitMsg0 (Raw to HTML)" ] && sh ./GitLab.CrossRepoSync.sh || true diff --git a/Wiki-OcttKB/tiddlers/System/$__OcttKB_Repo_GitLab.Main.sh.txt.meta b/Wiki-OcttKB/tiddlers/System/$__OcttKB_Repo_GitLab.Main.sh.txt.meta deleted file mode 100644 index 1d974da..0000000 --- a/Wiki-OcttKB/tiddlers/System/$__OcttKB_Repo_GitLab.Main.sh.txt.meta +++ /dev/null @@ -1,7 +0,0 @@ -created: 20230228075916930 -creator: Octt -modified: 20230228095455279 -modifier: Octt -tags: -title: $:/OcttKB/Repo/GitLab.Main.sh -type: text/plain \ No newline at end of file