enable netbsd compilation
This commit is contained in:
parent
be4dc0d3a2
commit
9ed836d028
|
@ -1,9 +1,10 @@
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
|
|
||||||
#[cfg(target_os = "linux")]
|
#[cfg(any(target_os = "linux", target_os = "netbsd"))]
|
||||||
pub fn config_base() -> PathBuf {
|
pub fn config_base() -> PathBuf {
|
||||||
PathBuf::from("/etc/tfclient")
|
PathBuf::from("/etc/tfclient")
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(target_os = "windows")]
|
#[cfg(target_os = "windows")]
|
||||||
pub fn config_base() -> PathBuf {
|
pub fn config_base() -> PathBuf {
|
||||||
PathBuf::from("C:\\Program Data\\e3team\\tfclient")
|
PathBuf::from("C:\\Program Data\\e3team\\tfclient")
|
||||||
|
@ -24,8 +25,6 @@ pub fn config_base() -> PathBuf {
|
||||||
compile_error!("tfclient cannot be compiled for dragonfly");
|
compile_error!("tfclient cannot be compiled for dragonfly");
|
||||||
#[cfg(target_os = "openbsd")]
|
#[cfg(target_os = "openbsd")]
|
||||||
compile_error!("tfclient cannot be compiled for openbsd");
|
compile_error!("tfclient cannot be compiled for openbsd");
|
||||||
#[cfg(target_os = "netbsd")]
|
|
||||||
compile_error!("tfclient cannot be compiled for netbsd");
|
|
||||||
|
|
||||||
pub fn config_dir(instance: &str) -> PathBuf {
|
pub fn config_dir(instance: &str) -> PathBuf {
|
||||||
config_base().join(format!("{}/", instance))
|
config_base().join(format!("{}/", instance))
|
||||||
|
@ -41,4 +40,4 @@ pub fn tfdata_toml(instance: &str) -> PathBuf {
|
||||||
|
|
||||||
pub fn nebula_yml(instance: &str) -> PathBuf {
|
pub fn nebula_yml(instance: &str) -> PathBuf {
|
||||||
config_base().join(format!("{}/", instance)).join("nebula.yml")
|
config_base().join(format!("{}/", instance)).join("nebula.yml")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue