aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorÓscar Nájera <hi@oscarnajera.com>2020-10-22 19:08:53 +0200
committerÓscar Nájera <hi@oscarnajera.com>2020-10-22 19:08:53 +0200
commitd0358bb08599ea4fe52fbe5bab1639bcd3bf71e3 (patch)
tree3fb027a6cef218ff00460ae3e768923a7d759cd1
parent871d1cee8feb1f4d034d9341f62dd32bd2b01d65 (diff)
downloaddotfiles-d0358bb08599ea4fe52fbe5bab1639bcd3bf71e3.tar.gz
dotfiles-d0358bb08599ea4fe52fbe5bab1639bcd3bf71e3.tar.bz2
dotfiles-d0358bb08599ea4fe52fbe5bab1639bcd3bf71e3.zip
Config link does not receive title
It always does a symlink, thus no need to name it
-rwxr-xr-xinstall.scm23
1 files changed, 13 insertions, 10 deletions
diff --git a/install.scm b/install.scm
index de36b33..d5c42d9 100755
--- a/install.scm
+++ b/install.scm
@@ -5,6 +5,7 @@
(logging logger)
(logging port-log)
(ice-9 ftw)
+ (ice-9 match)
(oop goops)
(term ansi-color))
@@ -61,36 +62,38 @@
(log-msg 'WARN (string-append "Deleting previous file: " full-dest))
(delete-file full-dest)))
-(define (config-links title src target)
+(define (config-links src target)
(let ((src-path (expand-file src))
(target-path (expand-file target)))
(unless (and (symlink? target-path) (equal? (readlink target-path) src-path))
(clean-file target-path)
(symlink src-path target-path)
- (log-msg 'OK (string-append title " on " target)))))
+ (log-msg 'OK (string-append "Symlink" src " -> " target)))))
(define (git-config)
(log-msg 'INFO "Configuring git")
- (config-links " Symlink global config" "git/global-gitconfig" "~/.gitconfig")
- (config-links " Symlink Tribe29 config" "git/tribe29" "~/git/.gitconfig"))
+ (log-msg 'INFO " Symlink global config")
+ (config-links "git/global-gitconfig" "~/.gitconfig")
+ (log-msg 'INFO " Symlink Tribe29 config")
+ (config-links "git/tribe29" "~/git/.gitconfig"))
(define (symlink-dir dir target-dir)
(let ((cur (getcwd)))
(chdir dir)
(map (lambda (cmd)
- (config-links (string-append " Symlink " cmd) cmd (string-append target-dir cmd)))
+ (config-links cmd (string-append target-dir cmd)))
(scandir "." (lambda (f) (eq? 'regular (stat:type (stat f))))))
(chdir cur)))
(define (main args)
(setup-logging)
(log-msg 'INFO "Symlink PIM")
- (config-links " Symlink agenda" "calendars.conf" "~/.calendars.conf")
+ (config-links "calendars.conf" "~/.calendars.conf")
(git-config)
- (config-links " Symlink guile defaults" "dot-guile" "~/.guile")
- (config-links " Symlink rofi" "rofi" "~/.config/rofi")
- (config-links " Symlink zshrc" "dot-zshrc" "~/.zshrc")
- (config-links " Symlink gpg-agent" "gnupu/gpg-agent.conf" "~/.gnupg/gpg-agent")
+ (config-links "dot-guile" "~/.guile")
+ (config-links "rofi" "~/.config/rofi")
+ (config-links "dot-zshrc" "~/.zshrc")
+ (config-links "gnupu/gpg-agent.conf" "~/.gnupg/gpg-agent")
(symlink-dir "bin" "~/.local/bin/")
(shutdown-logging))