diff options
author | John Ankarström <john@ankarstrom.se> | 2021-09-18 11:58:56 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2021-09-18 11:58:56 +0200 |
commit | 973edb08ed5ff35644328c244d5d584f44a70591 (patch) | |
tree | 864b7e74297fafa44db93ce5c55888380282de56 /Makefile | |
parent | b67acafd615ae705a3e3682f87f35027789ddda5 (diff) | |
download | cforum-973edb08ed5ff35644328c244d5d584f44a70591.tar.gz |
Implement `add' functions
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 15 |
1 files changed, 8 insertions, 7 deletions
@@ -15,20 +15,21 @@ clean: cforum: $(C) $(H) $(TPL) $(CC) $(CFLAGS) $(LDFLAGS) $(LDLIBS) -o cforum $(C) -README: .README - cp .README README - -.README: $(C) $(H) $(TPL) - <README >.README awk '/^ / {if(!i++){print;system($$0"|sed s/^/\\ /")}exit} {print}' +README: $(C) $(H) $(TPL) + <README >.README awk '/^ / {if(!i++){print;system($$0"|sed s/^/\\ /")}next} {i=0;print}' + mv .README README .t.tc: mktpl/mktpl <$< mktpl/mktpl >$@ db: + touch db + chown :www db + chmod g+w db sqlite3 db "CREATE TABLE settings(key, value, PRIMARY KEY (key));" sqlite3 db "INSERT INTO settings values('name', 'C Forum');" - sqlite3 db "CREATE TABLE users(name, full, hash NOT NULL, PRIMARY KEY (name));" - sqlite3 db "INSERT INTO users values('john', 'John Ankarström', '123');" + sqlite3 db "CREATE TABLE users(name, full, hash NOT NULL, created INT NOT NULL, PRIMARY KEY (name));" + sqlite3 db "INSERT INTO users values('john', 'John Ankarström', '123', 1462134896);" sqlite3 db "CREATE TABLE posts(parent INT, user INT NOT NULL, created INT NOT NULL, edited INT, subject NOT NULL, text NOT NULL, FOREIGN KEY (user) REFERENCES users(oid));" sqlite3 db "INSERT INTO posts values(NULL, 1, 1462137896, NULL, 'Hello World!', 'This is the first post.');" sqlite3 db "INSERT INTO posts values(1, 1, 1462138896, NULL, 'Re: Hello World!', 'This is the second post!');" |