From: Nishi Date: Tue, 1 Oct 2024 03:45:55 +0000 (+0000) Subject: some X-Git-Url: https://git.chaotic.ninja/gitweb/nishi/?a=commitdiff_plain;h=fbd6114c150f566e6268d8fb3cad20cfdf64ba3e;p=koakuma.git some git-svn-id: file:///raid/svn-personal/koakuma/trunk@2 219d0f9c-2d94-d447-890a-813e76b88fe9 --- diff --git a/Components/vcs_cvs.tcl b/Components/vcs_cvs.tcl new file mode 100644 index 0000000..7dd8e10 --- /dev/null +++ b/Components/vcs_cvs.tcl @@ -0,0 +1,2 @@ +# $Id$ +lappend components "CVS" "CVS Integration" "1.00" diff --git a/Components/vcs_svn.tcl b/Components/vcs_svn.tcl new file mode 100644 index 0000000..58cadf0 --- /dev/null +++ b/Components/vcs_svn.tcl @@ -0,0 +1,2 @@ +# $Id$ +lappend components "Subversion" "Subversion Integration" "1.00" diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..9f254a5 --- /dev/null +++ b/Makefile @@ -0,0 +1,21 @@ +# $Id$ + +PREFIX = /usr/local +REPLACE = sed "s%@@PREFIX@@%$(PREFIX)%g" + +.PHONY: install + +install: Components/* Tool/* koakuma.cgi.in + mkdir -p $(PREFIX)/lib/koakuma/components/ + mkdir -p $(PREFIX)/lib/koakuma/htdocs/static/ + mkdir -p $(PREFIX)/etc/koakuma/ + mkdir -p $(PREFIX)/lib/koakuma/cgi-bin/ + mkdir -p $(PREFIX)/bin/ + cp -rf Components/* $(PREFIX)/lib/koakuma/components/ + cp -rf Tool/* $(PREFIX)/bin/ + cp -rf koakuma.png $(PREFIX)/lib/koakuma/htdocs/static/ + $(REPLACE) koakuma.cgi.in > $(PREFIX)/lib/koakuma/cgi-bin/koakuma.cgi + $(REPLACE) apache.conf.in > $(PREFIX)/etc/koakuma/apache.conf + chmod +x $(PREFIX)/lib/koakuma/cgi-bin/koakuma.cgi + chmod +x $(PREFIX)/bin/create-task + chmod +x $(PREFIX)/bin/launch-job diff --git a/Tool/create-task b/Tool/create-task new file mode 100644 index 0000000..614af38 --- /dev/null +++ b/Tool/create-task @@ -0,0 +1,2 @@ +#!/usr/bin/env tclsh +# $Id$ diff --git a/Tool/launch-job b/Tool/launch-job new file mode 100644 index 0000000..614af38 --- /dev/null +++ b/Tool/launch-job @@ -0,0 +1,2 @@ +#!/usr/bin/env tclsh +# $Id$ diff --git a/apache.conf.in b/apache.conf.in new file mode 100644 index 0000000..b4fb8a6 --- /dev/null +++ b/apache.conf.in @@ -0,0 +1,15 @@ +# $Id$ +# vim: syntax=apache + +DocumentRoot @@PREFIX@@/lib/koakuma/htdocs + + Require all granted + + + Options +ExecCGI + Require all granted + +ScriptAlias /koakuma @@PREFIX@@/lib/koakuma/cgi-bin/koakuma.cgi + +RewriteEngine on +RewriteRule ^/$ /koakuma [END,NE,R=permanent] diff --git a/koakuma.cgi.in b/koakuma.cgi.in new file mode 100644 index 0000000..bea049e --- /dev/null +++ b/koakuma.cgi.in @@ -0,0 +1,55 @@ +#!/usr/bin/env tclsh +# $Id$ + +set KOAKUMA_VERSION "1.00" +set components "" + +proc exiting {code} { + exit $code +} + +proc crash {reason} { + global components KOAKUMA_VERSION + puts stderr "----- Start Koakuma Crash dump log -----" + puts stderr "Included components:" + foreach {name description version} $components { + puts stderr " $name: $description, version $version" + } + puts stderr "Reason: $reason" + puts stderr "----- End Koakuma Crash dump log -----" + puts "Content-Type: text/html" + puts "Status: 500 Internal Server Error" + puts "" + puts "" + puts "" + puts " " + puts " " + puts " Oops" + puts " " + puts " " + puts "

Oops

" + puts "
" + puts " Koakuma version $KOAKUMA_VERSION crashed, reason: $reason
" + puts " See the server error log for details." + puts " " + puts "" + exiting 1 +} + +foreach path [glob @@PREFIX@@/lib/koakuma/components/*.tcl] { + source "$path" +} + +proc start_html {title} { + puts "" + puts "" + puts " " + puts " " + puts " $title - Koakuma" + puts " " + puts " " +} +proc end_html {} { + puts " " + puts "" +} diff --git a/koakuma.png b/koakuma.png new file mode 100644 index 0000000..0426f25 Binary files /dev/null and b/koakuma.png differ