Skip to content

Commit b7a0689

Browse files
committed
build(project): fix build after moving files
1 parent 72c58b5 commit b7a0689

2 files changed

Lines changed: 6 additions & 8 deletions

File tree

sconstruct.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,9 @@ def make_project_name(org_file):
5151

5252
def make_export(source):
5353
build_el_path = path.abspath('tools/build.el')
54-
level = len(path.normpath(source).split(path.sep))
5554
return f'{emacs} {source} --quick --batch \
56-
--load {build_el_path}\
57-
--eval "(dt-export {level})"'
55+
--load {build_el_path} \
56+
--eval "(dt-export)"'
5857

5958

6059
# Target setup functions
@@ -79,7 +78,7 @@ def add_html_target(org_file, main_target):
7978
html_name = f'{name}Html'
8079

8180
def putHtml(target, source, env):
82-
move(f'{name}.html', f'build/{name}/{name}.html')
81+
move(f'add-ons/{name}.html', f'build/{name}/{name}.html')
8382
makedirs(f'build/{name}/tools/', exist_ok=True)
8483
copy('tools/org-adwaita.css', f'build/{name}/tools/org-adwaita.css')
8584

@@ -155,7 +154,7 @@ def pack(target, source, env):
155154
version = foundVersion.group(1) if foundVersion is not None else commit_sha
156155

157156
copytree('documentation', build_path / 'documentation', dirs_exist_ok=True)
158-
copy(org_file, build_path / org_file)
157+
copy(org_file, (build_path / name).with_suffix('.org'))
159158

160159
licenses_path = build_path / 'LICENSES'
161160
makedirs(licenses_path, exist_ok=True)

tools/build.el

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,14 @@
2929
(set-language-environment "UTF-8")
3030
(org-babel-tangle))
3131

32-
(defun dt-export (level)
32+
(defun dt-export ()
3333
(load (concat (file-name-directory dt-build-file-name) "htmlize.el"))
3434
(require 'htmlize)
3535
(setq org-confirm-babel-evaluate nil)
3636
(set-language-environment "UTF-8")
3737
(setq org-html-htmlize-output-type 'css)
3838
(setq org-html-validation-link nil)
39-
(setq relative-part (if (eq level 1) "" "../"))
40-
(setq css-path (concat relative-part "tools/org-adwaita.css"))
39+
(setq css-path "../tools/org-adwaita.css")
4140
(setq org-html-head-extra
4241
(format "<link rel=\"stylesheet\" type=\"text/css\" href=\"%s\"/>" css-path))
4342
(org-html-export-to-html))

0 commit comments

Comments
 (0)