Skip to content

Instantly share code, notes, and snippets.

@cnd
Last active December 29, 2015 07:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save cnd/7640445 to your computer and use it in GitHub Desktop.
Save cnd/7640445 to your computer and use it in GitHub Desktop.
let (ref cfg, ref appCfg) = {
if nix {
let prefix = Path::new( getenv("XDG_CONFIG_HOME").unwrap_or(~"") ).join("Mirana");
if !prefix.exists() { mkdir(&prefix, S_IRWXU as u32); }
( prefix.join( ".sync.conf" ),
prefix.join( ".mirana.conf" )
)
} else {
let prefix = Path::new( getenv("HOME").unwrap_or(~"") );
( prefix.join( "sync.conf" ),
prefix.join( "mirana.conf" )
)
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment