aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tom Willemsen2012-06-30 23:09:37 +0200
committerGravatar Tom Willemsen2012-06-30 23:09:37 +0200
commit968543cd3c4d221c02a24f740c97509be05f31c8 (patch)
tree6a05c2b7414b09a552ce22ec100848eedbbe3217
parent4379c6666d9fd9dbd4ff5d900ed072281afbf209 (diff)
downloadgitto-968543cd3c4d221c02a24f740c97509be05f31c8.tar.gz
gitto-968543cd3c4d221c02a24f740c97509be05f31c8.zip
Don't force XDG_DATA_HOME
Now, when XGD_DATA_HOME is empty, it should default to `~/.gitto/' for `data-dir', the old way didn't quite work since the `mkdir' function doesn't translate `~/' to HOME.
-rwxr-xr-xgitto.scm7
1 files changed, 5 insertions, 2 deletions
diff --git a/gitto.scm b/gitto.scm
index 177f924..9d21556 100755
--- a/gitto.scm
+++ b/gitto.scm
@@ -7,8 +7,11 @@
(ice-9 rdelim))
(define data-dir
- (string-append (or (getenv "XDG_DATA_HOME") "~/.local/share")
- "/gitracker"))
+ (let ((xdg (getenv "XGD_DATA_HOME"))
+ (name "gitto"))
+ (if xdg
+ (string-append xdg "/" name)
+ (string-append (getenv "HOME") "/." name))))
(define repositories-file
(string-append data-dir "/repos.scm"))