Subversion Repositories Koakuma

Rev

Rev 5 | Rev 11 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5 Rev 8
Line 1... Line 1...
1
#!/usr/bin/env tclsh
1
#!/usr/bin/env tclsh
2
# $Id: create-project.in 5 2024-10-01 18:07:27Z nishi $
2
# $Id: create-project.in 8 2024-10-01 23:05:34Z nishi $
3
package require tdom
3
package require tdom
4
set RPC_URL "http://127.0.0.1/koakuma/rpc"
-
 
5
foreach arg $argv {
4
foreach arg $argv {
6
	if { [string range "$arg" 0 0] == "-" } {
5
	if { [string range "$arg" 0 0] == "-" } {
7
		if { "$arg" == "-h" || "$arg" == "--help" } {
6
		if { "$arg" == "-h" || "$arg" == "--help" } {
8
			puts "Usage: create-project"
7
			puts "Usage: create-project"
9
			puts "You can set the environment variable `KOAKUMA_RPC' to override default RPC URL."
8
			puts "You can set the environment variable `KOAKUMA_RPC' to override default RPC URL."
Line 13... Line 12...
13
	}
12
	}
14
}
13
}
15
foreach path [glob "@@PREFIX@@/lib/koakuma/utility/*.tcl"] {
14
foreach path [glob "@@PREFIX@@/lib/koakuma/utility/*.tcl"] {
16
	source $path
15
	source $path
17
}
16
}
18
if { [info exists "env(KOAKUMA_RPC)"] } {
-
 
19
	set RPC_URL "$env(KOAKUMA_RPC)"
-
 
20
}
-
 
21
set RPC_URL "[regsub {/+$} "$RPC_URL" ""]"
-
 
22
puts -nonewline "Authentication: "
17
puts -nonewline "Authentication: "
23
set status [::rpc::require-auth]
18
set status [::rpc::require-auth]
24
if { $status == 1 } {
19
if { $status == 1 } {
25
	puts "Required"
20
	puts "Required"
26
	if { ![::rpc::ask-auth] } {
21
	if { ![::rpc::ask-auth] } {