dotfiles

config files and scripts at HOME.
git clone git://git.ricketyspace.net/dotfiles.git
Log | Files | Refs

commit a5dd889b81b3b4df0d6e6ced4a1a1689f74178a2
parent a18936c25a47f7a3f3fa938c3d856cac0726969b
Author: rsiddharth <rsiddharth@ninthfloor.org>
Date:   Tue, 14 Jun 2016 19:15:15 +0000

add .bin/fd

It's a guile version of .bin/fdump

Diffstat:
.bin/fd | 30++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+), 0 deletions(-)

diff --git a/.bin/fd b/.bin/fd @@ -0,0 +1,30 @@ +#!/home/rsd/.guix-profile/bin/guile \ +-e main -s +!# +;; coding: utf-8 +;; license: gnu gpl version 3 or higher. +;; author: rsiddharth <s@ricketyspace.net> + +;; destination to dump file(s) to. +(define (dest) + (let ((d (getenv "FDUMP_DEST"))) + (if d d (error "Error: FDUMP_DEST not set!\n")))) + +;; path to ssh private key. +(define ident + (getenv "FDUMP_ID")) + +;; scp command. +(define scp "scp") + +;; dump a file. +(define (dump file) + (let ((id ident) + (d (dest))) + (if id + (system* scp "-i" id file d) + (system* scp file d)))) + +;; main function. +(define (main srcs) + (map dump (cdr srcs)))