dotfiles

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

commit 696155f61b3cd50457fd6ba8792749be8c83bf6f
parent 372ebce80815faf09d2a32484023c396ad829649
Author: rsiddharth <s@ricketyspace.net>
Date:   Mon, 31 Oct 2016 22:41:21 +0000

Add .bin/rsync-bu-to

This script will replace `rsync-bu-jarl` and `rsync-bu-chum`.

Diffstat:
.bin/rsync-bu-to | 31+++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+), 0 deletions(-)

diff --git a/.bin/rsync-bu-to b/.bin/rsync-bu-to @@ -0,0 +1,31 @@ +#!/bin/sh +# +# Copyright (C) 2016 rsiddharth <s@ricketyspace.net> +# +# This program is free software: you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program (see COPYING). If not, see +# <http://www.gnu.org/licenses/>. + +# filter path +FILTER=$1 +# rsync-bu-to path +BACKUP_PATH=$2 + +if [ -d $BACKUP_PATH ]; then + echo 'rsync-bu-to' $BACKUP_PATH '...' + rsync -ravz --delete-excluded --files-from=$FILTER $HOME $BACKUP_PATH + echo 'finished rsync-bu-to ' $BACKUP_PATH +else + echo $BACKUP_PATH 'not found.' + exit 1 +fi