From 968543cd3c4d221c02a24f740c97509be05f31c8 Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Sat, 30 Jun 2012 23:09:37 +0200 Subject: 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. --- gitto.scm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'gitto.scm') 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")) -- cgit v1.2.3-54-g00ecf