dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit 65a78fd4d224366501e5864a863ce35fde1e2272
parent 3367df44f13a875e20898392825faeb7d7741a52
Author: Anders Damsgaard Christensen <adc@geo.au.dk>
Date:   Tue,  6 Sep 2016 10:43:38 -0700

Merge branch 'master' of github.com:anders-dc/dotfiles

Diffstat:
M.zshrc | 12++++++------
Abin/photo-drive-sync.sh | 49+++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 55 insertions(+), 6 deletions(-)

diff --git a/.zshrc b/.zshrc @@ -78,16 +78,16 @@ alias v='nvim' alias f='fg' alias vi='vim -u NONE' #alias vi='nvim -u NONE' -alias gs='git status' -alias gl='git log --oneline' +alias gs='git status | less' +alias gl='git log --graph --oneline --decorate --all' alias ga='git add' alias gd='git diff --' -alias gc='git commit -v -S' -alias gca='git commit -a -v -S' +alias gc='git commit --verbose --gpg-sign' +alias gca='git commit --all --verbose --gpg-sign' alias gp='git push' alias gpu='git pull' -alias gcgp='git commit -v -S && git push' -alias gcagp='git commit -a -v -S && git push' +alias gcgp='git commit --verbose --gpg-sign && git push' +alias gcagp='git commit --all --verbose --gpg-sign && git push' alias clear='clear && tmux clear-history' alias ct='ctags -R .' alias findgrep='find . | grep -i ' diff --git a/bin/photo-drive-sync.sh b/bin/photo-drive-sync.sh @@ -0,0 +1,49 @@ +#!/bin/bash + +diskA=/Volumes/ANDERS +diskB=/Volumes/SUSAN +#diskC=/Volumes/misc + +echo "Copying from local drive to first external drive ($diskA)" + +# Lightroom +echo "Copying Lightroom files to first external drive ($diskA)" +rsync -rav --progress ~/Pictures/Lightroom $diskA/Anders\ flaptop/ +rsync -rav --progress ~/iCloud/Lightroom-exports $diskA/Anders\ flaptop/ + +# Capture One +echo "Copying Capture One files to first external drive ($diskA)" +rsync -rav --progress ~/Pictures/Capture\ One\ Catalog.cocatalog $diskA/Anders\ flaptop/ +rsync -rav --progress ~/Pictures/CaptureOne\ exports $diskA/Anders\ flaptop/ + +# Photos.app +echo "Copying Photos.app files to first external drive ($diskA)" +rsync -rav --progress ~/Pictures/Photos\ Library.photoslibrary $diskA/Anders\ flaptop/ +rsync -rav --progress ~/Pictures/Photos\ exports $diskA/Anders\ flaptop/ + +if [ -d $diskB ]; then + echo "Mirroring external drives ($diskA -> $diskB)" + rsync -rav --delete --exclude="/.*" --progress $diskA/ $diskB +fi + +read -p "Unmount external drive $diskA? [y/N] " -n 1 -r +echo +if [[ $REPLY =~ ^[Yy]$ ]]; then + diskutil eject $diskA +fi + +if [ -d $diskB ]; then + read -p "Unmount external drive $diskB? [y/N] " -n 1 -r + echo + if [[ $REPLY =~ ^[Yy]$ ]]; then + diskutil eject $diskB + fi +fi + +#if [ -d $diskC ]; then +# read -p "Unmount external drive $diskC? [y/N] " -n 1 -r +# echo +# if [[ $REPLY =~ ^[Yy]$ ]]; then +# diskutil eject $diskC +# fi +#fi