hacks/homedir.makefile/Makefile

47 lines
1.1 KiB
Makefile
Raw Normal View History

2012-06-20 08:22:58 +00:00
JUNKFILES = .bash_history .irb_history .pip .ScanSnap .nbems .fldigi .cpan
JUNKFILES += .gdb_history .mysql_history .sqlite_history
2012-12-19 00:17:00 +00:00
YYYYMM := $(shell date +%Y%m)
2012-06-20 08:22:58 +00:00
2013-02-28 16:38:06 +00:00
NO_COLOR = \033[0m
O1_COLOR = \033[0;01m
O2_COLOR = \033[32;01m
PREFIX = "$(O2_COLOR)==>$(O1_COLOR)"
SUFFIX = "$(NO_COLOR)"
2012-06-20 08:22:58 +00:00
default: backup
2013-03-03 22:29:23 +00:00
backup: clean mailoffsite databackup
dvbackup:
2013-02-28 16:38:06 +00:00
@echo $(PREFIX) $@ $(SUFFIX)
cd ~/Documents/datavibe/backup && make
2013-03-03 22:29:23 +00:00
imapbackup:
2013-02-28 16:38:06 +00:00
offlineimap
rsync -e "ssh -c arcfour -o Compression=no -x" \
-avPhzy --delete sneak@datavibe.net:.maildir/ \
$(HOME)/Documents/Archival/mail/sneak.datavibe.net.maildir/
2013-03-03 22:29:23 +00:00
mailoffsite: imapbackup
2013-02-28 16:38:06 +00:00
rsync -e "ssh -c arcfour -o Compression=no -x" \
-avPhzy --delete $(HOME)/Documents/Archival/mail/ \
sneak@datavibe.net:.mailbackup/
2013-03-03 22:29:23 +00:00
databackup: dvbackup imapbackup
2013-02-28 16:38:06 +00:00
backup.command
2012-06-20 08:22:58 +00:00
2013-03-27 07:32:34 +00:00
cleanup:
-mkdir -p $(HOME)/Documents/$(YYYYMM)
-mv $(HOME)/Desktop/* $(HOME)/Documents/$(YYYYMM)
clean: cleanup
2013-02-28 16:38:06 +00:00
@echo $(PREFIX) $@ $(SUFFIX)
@-rm -rf ~/tmp/*
@-rm -rf ~/Library/Caches/*
@-rm -rf ~/.Trash/*
@-rm -rf $(JUNKFILES)
2012-06-20 08:22:58 +00:00
size:
du -sh $(HOME)