diff --git a/build-wordconvert.sh b/build-wordconvert.sh new file mode 100755 index 00000000..67da2333 --- /dev/null +++ b/build-wordconvert.sh @@ -0,0 +1,19 @@ +#! /bin/bash + +NOW=$(date) +echo "Build process started $NOW" + +cd .. +for arch in amd64 ; do + for os in darwin linux windows ; do + if [ "$os" == "windows" ] ; then + echo "Compiling wordconvert-$os.exe" + env GOOS=$os GOARCH=$arch go build -o ./bin/wordconvert-$os.exe github.com/documize/community/cmd/wordconvert + else + echo "Compiling wordconvert-$os" + env GOOS=$os GOARCH=$arch go build -o ./bin/wordconvert-$os github.com/documize/community/cmd/wordconvert + fi + done +done + +echo "Finished." diff --git a/cmd/wordconvert/main.go b/cmd/wordconvert/main.go index 65e0f4b8..b71d02db 100644 --- a/cmd/wordconvert/main.go +++ b/cmd/wordconvert/main.go @@ -36,8 +36,9 @@ var outputDir = flag.String("o", ".", "specify the directory to hold the output" var ignoreBadCert = flag.Bool("k", false, "ignore bad certificate errors") var verbose = flag.Bool("v", false, "verbose progress messages") var stayziped = flag.Bool("z", false, "do not automatically unzip content") -var token = flag.String("t", "", "authorization token (use your e-mail address during beta period)") +var token = flag.String("t", "", "authorization token (if you use your e-mail address here during preview period, we will tell you before changes are made)") var ignoreErrs = flag.Bool("e", false, "report errors on individual files, but continue") +var version = flag.Bool("version", false, "display the version of this code") func validXtn(fn string) bool { lcfn := strings.ToLower(fn) @@ -65,6 +66,10 @@ func main() { flag.Parse() + if *version { + fmt.Println("Version: 0.1 preview") + } + if *outputDir != "." { if err := os.Mkdir(*outputDir, 0777); err != nil && !os.IsExist(err) { errCanContinue(false, err)