mirror of
https://github.com/bluszcz/cutego.git
synced 2024-09-29 13:45:17 +03:00
35 lines
761 B
Go
35 lines
761 B
Go
|
package utils
|
||
|
|
||
|
import (
|
||
|
"os"
|
||
|
"path/filepath"
|
||
|
)
|
||
|
|
||
|
func RPI_TOOLS_DIR() string {
|
||
|
if dir := os.Getenv("RPI_TOOLS_DIR"); dir != "" {
|
||
|
return filepath.Clean(dir)
|
||
|
}
|
||
|
return filepath.Join(os.Getenv("HOME"), "raspi/tools")
|
||
|
}
|
||
|
|
||
|
func RPI1_SYSROOT_DIR() string {
|
||
|
if dir := os.Getenv("RPI1_SYSROOT_DIR"); dir != "" {
|
||
|
return filepath.Clean(dir)
|
||
|
}
|
||
|
return filepath.Join(os.Getenv("HOME"), "raspi/sysroot")
|
||
|
}
|
||
|
|
||
|
func RPI2_SYSROOT_DIR() string {
|
||
|
if dir := os.Getenv("RPI2_SYSROOT_DIR"); dir != "" {
|
||
|
return filepath.Clean(dir)
|
||
|
}
|
||
|
return filepath.Join(os.Getenv("HOME"), "raspi/sysroot")
|
||
|
}
|
||
|
|
||
|
func RPI3_SYSROOT_DIR() string {
|
||
|
if dir := os.Getenv("RPI3_SYSROOT_DIR"); dir != "" {
|
||
|
return filepath.Clean(dir)
|
||
|
}
|
||
|
return filepath.Join(os.Getenv("HOME"), "raspi/sysroot")
|
||
|
}
|