use TOOLS_PATH env variable for archiver and linker

This commit is contained in:
Loic Gelle 2017-06-27 09:50:12 -07:00
parent e32b3bfeb4
commit eb5de09ac2

View File

@ -58,11 +58,19 @@ func parseExtractingArgs(args []string) ExtractingArgs {
// Checking environment variables // Checking environment variables
if ln := os.Getenv(LINKER_NAME); ln != "" { if ln := os.Getenv(LINKER_NAME); ln != "" {
if toolsPath := os.Getenv(TOOLS_PATH); toolsPath != "" {
ea.LinkerName = toolsPath + ln
} else {
ea.LinkerName = ln ea.LinkerName = ln
} }
}
if an := os.Getenv(AR_NAME); an != "" { if an := os.Getenv(AR_NAME); an != "" {
if toolsPath := os.Getenv(TOOLS_PATH); toolsPath != "" {
ea.ArchiverName = toolsPath + an
} else {
ea.ArchiverName = an ea.ArchiverName = an
} }
}
// Parsing cli input // Parsing cli input
for len(args) > 0 { for len(args) > 0 {