>From 69b9fe98d38722fc808682ff4cffb801715b492c Mon Sep 17 00:00:00 2001 From: Antono Vasiljev Date: Fri, 20 Jan 2012 12:57:03 +0300 Subject: [PATCH 1/2] Use $XDG_CONFIG_HOME directory for configuration files * http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html --- main.scm | 21 +++++++++++---------- 1 files changed, 11 insertions(+), 10 deletions(-) diff --git a/main.scm b/main.scm index 5470a55..28ca6e1 100644 --- a/main.scm +++ b/main.scm @@ -150,7 +150,7 @@ Usage: " (car (command-line)) ((mcron) " [OPTIONS] [FILES]\n Run an mcron process according to the specifications in the FILES (`-' for\n -standard input), or use all the files in ~/.cron with .guile or .vixie\n +standard input), or use all the files in ~/.config/cron with .guile or .vixie\n extensions.\n \n -v, --version Display version\n @@ -296,13 +296,13 @@ Report bugs to " config-package-bugreport ".\n -;; Procedure to run through all the files in a user's ~/.cron directory (only +;; Procedure to run through all the files in a user's ~/.config/cron directory (only ;; happens under the mcron personality). (define (process-files-in-user-directory) (catch #t (lambda () (let* ((dir-path (string-append (passwd:dir (getpw (getuid))) - "/.cron")) + "/.config/cron")) (directory (opendir dir-path))) (do ((file-name (readdir directory) (readdir directory))) ((eof-object? file-name) (closedir directory)) @@ -310,7 +310,7 @@ Report bugs to " config-package-bugreport ".\n "/" file-name))))) (lambda (key . args) - (mcron-error 13 "Cannot read files in your ~/.cron directory.")))) + (mcron-error 13 "Cannot read files in your ~/.config/cron directory.")))) @@ -358,12 +358,13 @@ Report bugs to " config-package-bugreport ".\n -;; Having defined all the necessary procedures for scanning various sets of -;; files, we perform the actual configuration of the program depending on the -;; personality we are running as. If it is mcron, we either scan the files -;; passed on the command line, or else all the ones in the user's .cron -;; directory. If we are running under the cron personality, we read the -;; /var/cron/tabs directory and also the /etc/crontab file. +;; Having defined all the necessary procedures for scanning various +;; sets of files, we perform the actual configuration of the program +;; depending on the personality we are running as. If it is mcron, we +;; either scan the files passed on the command line, or else all the +;; ones in the user's ~/.config/cron directory. If we are running +;; under the cron personality, we read the /var/cron/tabs directory +;; and also the /etc/crontab file. (case command-type ((mcron) (if (null? (option-ref options '() '())) -- 1.7.5.4