This commit is contained in:
parent
fed7aa845e
commit
5b41b4914c
4
build.sh
4
build.sh
@ -1,8 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -eu
|
set -eu
|
||||||
clang generate.c -o generate -std=gnu2x -g
|
clang generate.c -o generate -std=gnu2x -g
|
||||||
./generate
|
|
||||||
rm -rf public || true
|
rm -rf public || true
|
||||||
mkdir public
|
./generate
|
||||||
cp -r pdf public/pdf
|
cp -r pdf public/pdf
|
||||||
cp index.html public/index.html
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
#include <sys/ptrace.h>
|
#include <sys/ptrace.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
@ -365,7 +366,9 @@ fn void write_document(Writer* writer)
|
|||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
int fd = open("index.html", O_TRUNC | O_WRONLY | O_CREAT, 0644);
|
let(mkdir_result, mkdir("public", 0755));
|
||||||
|
assert(mkdir_result == 0);
|
||||||
|
int fd = open("public/index.html", O_TRUNC | O_WRONLY | O_CREAT, 0644);
|
||||||
assert(fd >= 0);
|
assert(fd >= 0);
|
||||||
Writer writer = {};
|
Writer writer = {};
|
||||||
write_document(&writer);
|
write_document(&writer);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user