From e0c3b8433b405430b1960ab6e41c478414aeb737 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20N=C3=A1jera?= Date: Mon, 28 Sep 2020 22:40:11 +0200 Subject: Code unification --- install.scm | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'install.scm') diff --git a/install.scm b/install.scm index 770dd81..0923488 100755 --- a/install.scm +++ b/install.scm @@ -57,19 +57,19 @@ (delete-file full-dest)) full-dest) +(define (config-links title src target) + (symlink (expand-file src) (clean-file (expand-file target))) + (log-msg 'OK (string-append title " on " target))) + (define (git-config) (log-msg 'INFO "Configuring git") - (symlink (expand-file "git/global-gitconfig") (clean-file (expand-file "~/.gitconfig"))) - (log-msg 'OK " Symlink global config") - (symlink (expand-file "git/tribe29") (clean-file (expand-file "~/git/.gitconfig"))) - (log-msg 'OK " Symlink Tribe29 config")) + (config-links " Symlink global config" "git/global-gitconfig" "~/.gitconfig") + (config-links " Symlink Tribe29 config" "git/tribe29" "~/git/.gitconfig")) (define (main args) (setup-logging) (log-msg 'INFO "Symlink PIM") - - (symlink (expand-file "calendars.conf") (clean-file (expand-file "~/.calendars.conf"))) - (log-msg 'OK " Symlink agenda") + (config-links " Symlink agenda" "calendars.conf" "~/.calendars.conf") (git-config) (shutdown-logging)) -- cgit v1.2.3