/usr/games/sc_tree is in scid 1:4.5.1.cvs20140429-2ubuntu1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | #!/bin/sh
# \
exec tkscid "$0" "$@"
proc usage {} {
puts stderr {Usage: sc_tree [-eco <eco-file>] [-pgn <output-file>] <database> [moves...]}
puts stderr {Example: sc_tree -pgn out.pgn mygames 1.e4 e6}
exit 1
}
set ecoFile ""
set pgnFile ""
if {[llength $argv] == 0} { usage }
while {[lindex $argv 0] == "-eco" || [lindex $argv 0] == "-pgn"} {
if {[llength $argv] < 3} { usage }
if {[lindex $argv 0] == "-eco"} {
set ecoFile [lindex $argv 1]
} else {
set pgnFile [lindex $argv 1]
}
set argv [lrange $argv 2 end]
}
set base [lindex $argv 0]
set argv [lrange $argv 1 end]
if {[llength $argv] > 0 && [catch {eval sc_move addSan $argv} err]} {
puts stderr "Error in move list: $err"
exit 1
}
if {$ecoFile != ""} {
if {[catch {sc_eco read $ecoFile} err]} {
puts stderr "Unable to read ECO file: $ecoFile"
exit 1
}
}
if {[catch {sc_base open -fast -readonly $base} err]} {
puts stderr "Error opening database \"$base\": $err"
exit 1
}
puts [sc_tree search]
if {$pgnFile != ""} {
puts ""
if {[file exists $pgnFile]} {
puts "Output file \"[file tail $pgnFile]\" already exists! It was not altered."
} else {
sc_base export filter PGN $pgnFile -comments 1 -variations 1
puts "Wrote [sc_filter count] games to $pgnFile"
}
}
sc_base close
|