diff options
| -rwxr-xr-x | link.scm | 14 | 
1 files changed, 7 insertions, 7 deletions
| @@ -1,7 +1,7 @@  #!/usr/bin/env guile  !#  (use-modules (mkdir-p) -	     (srfi srfi-19)) +             (srfi srfi-19))  (define dotfiles    '(.emacs @@ -15,15 +15,15 @@  (define (symlink-dotfile dotfile)    (let ((oldpath (string-append dotfiles-directory "/" (symbol->string dotfile))) -	(newpath (string-append (getenv "HOME") "/" (symbol->string dotfile)))) +        (newpath (string-append (getenv "HOME") "/" (symbol->string dotfile))))      (cond       ((string-index-right newpath #\/)        => (lambda (i) (mkdir-p (substring newpath 0 i)))))      (call/cc (lambda (skip) -	       (when (file-exists? newpath) -		 (when (string=? oldpath (readlink newpath)) -		   (skip)) -		 (rename-file newpath (string-append newpath backup-suffix))) -	       (symlink oldpath newpath))))) +               (when (file-exists? newpath) +                 (when (string=? oldpath (readlink newpath)) +                   (skip)) +                 (rename-file newpath (string-append newpath backup-suffix))) +               (symlink oldpath newpath)))))  (for-each symlink-dotfile dotfiles) | 
