config.go 483 Bytes
Newer Older
Lei Li's avatar
Lei Li committed
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
package main

import (
	"os"
	"path/filepath"
)

var (
	RootDir       = ""
	agentFileName = "lw_android_agent"

	agentVersionURL            = "https://cdn2.bkdomain.cn/android-agent/VersionReport"
	agentVersionReportFileName = ".versionReport"

	childPID int
)

func GetCurrentDirectory() (ret string) {
	dir, err := filepath.Abs(filepath.Dir(os.Args[0]))
	if err != nil {
		//fmt.Println("fail to get workdir:",err)
		ret = "/writable/agent-new"
	} else {
		ret = dir
	}

	return
}