Permalink
Browse files

add -build option to print build date

  • Loading branch information...
pulpofred
pulpofred committed Mar 12, 2016
1 parent 591b56e commit 0ca9d148a94725ff3a55f2256421a215b5239457
Showing with 8 additions and 3 deletions.
  1. +8 −3 fruho/main.tcl
@@ -123,6 +123,7 @@ proc main {} {
{remove-launcher "Remove desktop launcher"}
{id "Show client id from the certificate"}
{version "Print version"}
{build "Print build date"}
{locale en "Run particular language version"}
}
set usage ": fruho \[options]\noptions:"
@@ -137,15 +138,13 @@ proc main {} {
log $err
}
puts stderr [build-date]
puts stderr [build-version]
model load
# Copy cadir because it must be accessible from outside of the starkit
# Overwrites certs on every run
copy-merge [file join [file dir [info script]] certs] [model CADIR]
if {$params(cli) || ![unix is-x-running] || $params(version) || $params(id) || $params(generate-keys) || $params(add-launcher) || $params(remove-launcher)} {
if {$params(cli) || ![unix is-x-running] || $params(build) | $params(version) || $params(id) || $params(generate-keys) || $params(add-launcher) || $params(remove-launcher)} {
set ::model::Ui cli
} else {
set ::model::Ui gui
@@ -154,6 +153,9 @@ proc main {} {
if {$params(version)} {
exit-nosave [build-version]
}
if {$params(build)} {
exit-nosave [build-date]
}
if {$params(generate-keys)} {
main-generate-keys
@@ -171,6 +173,9 @@ proc main {} {
}
puts stderr [build-date]
puts stderr [build-version]
try {
set cn [extract-cn-from csr [ovpndir fruho client.csr]]
set ::model::Cn $cn

0 comments on commit 0ca9d14

Please sign in to comment.