mirror of
https://github.com/rwinkhart/libmutton.git
synced 2026-08-27 20:36:29 -04:00
Native support for iOS dirs; bind SSH dir to variable
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
//go:build ios
|
||||
|
||||
package global
|
||||
|
||||
import (
|
||||
"path/filepath"
|
||||
|
||||
"github.com/rwinkhart/go-boilerplate/back"
|
||||
)
|
||||
|
||||
func init() {
|
||||
// get the app's Library/Application Support directory (private, not backed up by iCloud)
|
||||
back.Home = filepath.Join(back.Home, "Library", "Application Support", "libmutton-ios")
|
||||
}
|
||||
|
||||
var (
|
||||
EntryRoot = back.Home + "/entries" // Path to libmutton entry directory
|
||||
CfgDir = back.Home + "/config" // Path to libmutton configuration directory
|
||||
CfgPath = CfgDir + "/libmuttoncfg.json" // Path to libmutton configuration file
|
||||
AgeDir = CfgDir + "/age" // Path to libmutton password age directory
|
||||
SSHDir = back.Home + "/ssh" // Path to SSH directory
|
||||
)
|
||||
|
||||
const (
|
||||
PathSeparator = "/" // Platform-specific path separator
|
||||
IsWindows = false // Platform indicator
|
||||
)
|
||||
@@ -1,4 +1,4 @@
|
||||
//go:build !windows
|
||||
//go:build !windows && !ios && !android
|
||||
|
||||
package global
|
||||
|
||||
@@ -9,6 +9,7 @@ var (
|
||||
CfgDir = back.Home + "/.config/libmutton" // Path to libmutton configuration directory
|
||||
CfgPath = CfgDir + "/libmuttoncfg.json" // Path to libmutton configuration file
|
||||
AgeDir = CfgDir + "/age" // Path to libmutton password age directory
|
||||
SSHDir = back.Home + "/.ssh" // Path to SSH directory
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -9,6 +9,7 @@ var (
|
||||
CfgDir = back.Home + "\\AppData\\Local\\libmutton\\config" // Path to libmutton configuration directory
|
||||
CfgPath = CfgDir + "\\libmuttoncfg.json" // Path to libmutton configuration file
|
||||
AgeDir = CfgDir + "\\age" // Path to libmutton password age directory
|
||||
SSHDir = back.Home + "\\.ssh" // Path to SSH directory
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
Reference in New Issue
Block a user