$(REPLACE) Tool/launch-job.in > $(PREFIX)/bin/launch-job
cp -rf Static/* $(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
- cp cgi.conf $(PREFIX)/etc/koakuma/
+ if [ ! -e "$(PREFIX)/etc/koakuma/apache.conf" ] ; then $(REPLACE) apache.conf.in > $(PREFIX)/etc/koakuma/apache.conf ; fi
+ if [ ! -e "$(PREFIX)/etc/koakuma/cgi.conf" ] ; then cp cgi.conf $(PREFIX)/etc/koakuma/ ; fi
chmod +x $(PREFIX)/lib/koakuma/cgi-bin/koakuma.cgi
chmod +x $(PREFIX)/bin/create-project
chmod +x $(PREFIX)/bin/launch-job
}
} else {
if { "$dothis" == "set-username" } {
- set ::rpc::useranme "$arg"
+ ::rpc::set-username "$arg"
} elseif { "$dothis" == "set-password" } {
- set ::rpc::password "$arg"
+ ::rpc::set-password "$arg"
} elseif { "$dothis" == "set-rpc" } {
set RPC_URL "$arg"
} elseif { "$name" == "" } {
set RPC_URL "[regsub {/+$} "$RPC_URL" ""]"
namespace eval rpc {
+ set username ""
+ set password ""
proc require-auth {} {
global RPC_URL
set tok [::http::geturl "$RPC_URL"]
return 0
}
}
- set username ""
- set password ""
+ proc set-username {us} {
+ global username
+ set ::rpc::username "$us"
+ }
+ proc set-password {pw} {
+ global password
+ set ::rpc::password "$pw"
+ }
proc ask-auth {} {
global username
global password