# Regulart Meeting (2020.7.12) * Regarding Build TCL * Purpose: implement [*getopt*](https://docs.python.org/3/library/getopt.html) ``` tclsh % tclsh example.tcl -o /path/to/output/dir -b /path/to/build/dir ``` * Problem: `switch` control bug * RAID-1 * https://2formosa.blogspot.com/2020/05/ubuntu-20.04-boot-from-RAID-1.html * https://github.com/curly-wei/ArchLinux_ug/blob/master/1.install-archlinux-with-efi-and-gpt-without-gui.md#4-b-if-you-want-install-archlinux-with-raid ## Regarding bug of Build TCL ```tclsh package require cmdline set param { {O.arg "" "Output Dir"} {B.arg "" "Build Dir"} } array set arg [cmdline::getoptions argv ${param}] set requiredParameters {O B} foreach i ${requiredParameters} { puts "==============" puts "this iter:" puts ${i} puts "arg(iter):" puts $arg(${i}) puts "----------" if {$arg(${i}) == ""} { error "Missing required parameter: -${i}" } else { puts "----------" puts "if-statement:" if { $arg(${i}) == $arg(O) } { puts "O" } elseif { $arg(${i}) == $arg(B) } { puts "B" } else { puts "none" } puts "----------" puts "switch-statement:" switch $arg(${i}) { $arg(O) { puts "O" } $arg{B} { puts "B" } default { puts "none" } } } puts "==============\n" } ``` ###### tags: `Regular Meeting` `DeWei`
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up