mirror of
https://github.com/documize/community.git
synced 2025-07-24 15:49:44 +02:00
add word convert
This commit is contained in:
parent
a9e182de2e
commit
43a951f02e
2 changed files with 25 additions and 1 deletions
19
build-wordconvert.sh
Executable file
19
build-wordconvert.sh
Executable file
|
@ -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."
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue