diff options
| author | pboutill | 2011-11-20 20:03:06 +0000 |
|---|---|---|
| committer | pboutill | 2011-11-20 20:03:06 +0000 |
| commit | 5ec2163ce648db25aba87f5208841397fd2e1b1c (patch) | |
| tree | 7605292fdb65b235b98f315cc07694363c286ba5 /lib | |
| parent | ab6f28a2a5251cc7ef18948dc619781e82e43e71 (diff) | |
coqrc in the right XDG_CONFIG_HOME/coq folder
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@14696 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/envars.ml | 5 | ||||
| -rw-r--r-- | lib/envars.mli | 1 | ||||
| -rw-r--r-- | lib/system.ml | 2 |
3 files changed, 7 insertions, 1 deletions
diff --git a/lib/envars.ml b/lib/envars.ml index 5cffad06c8..dc71cb4330 100644 --- a/lib/envars.ml +++ b/lib/envars.ml @@ -56,6 +56,11 @@ let xdg_data_home = (System.getenv_else "XDG_DATA_HOME" (Filename.concat System.home ".local/share")) "coq" +let xdg_config_home = + Filename.concat + (System.getenv_else "XDG_CONFIG_HOME" (Filename.concat System.home ".config")) + "coq" + let xdg_data_dirs = try List.map (fun dir -> Filename.concat dir "coq") (path_to_list (Sys.getenv "XDG_DATA_DIRS")) diff --git a/lib/envars.mli b/lib/envars.mli index d2799074eb..0c80492f8d 100644 --- a/lib/envars.mli +++ b/lib/envars.mli @@ -15,6 +15,7 @@ val coqbin : string val coqroot : string (* coqpath is stored in reverse order, since that is the order it * gets added to the searc path *) +val xdg_config_home : string val xdg_dirs : string list val coqpath : string list diff --git a/lib/system.ml b/lib/system.ml index edab244606..7d54e2c3a2 100644 --- a/lib/system.ml +++ b/lib/system.ml @@ -33,7 +33,7 @@ let home = try Sys.getenv "USERPROFILE" with Not_found -> warning ("Cannot determine user home directory, using '.' ."); flush_all (); - "." + Filename.current_dir_name let safe_getenv n = safe_getenv_def n ("$"^n) |
