dotfiles

Obligatory dotfiles repo
git clone git://git.danielmoch.com/dotfiles.git
Log | Files | Refs

commit 5f251855a8957f82953a915e9f7c90708c8189b4
parent 7cc4edcb4d2fb8accc2aa165a9776429384c8c38
Author: Daniel Moch <daniel@danielmoch.com>
Date:   Sun,  7 Jan 2018 17:40:55 -0500

Replace -n test with -z in previous commit

Diffstat:
M.config/cron/photosync.sh | 11+++++++++--
M.shrc | 2+-
2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/.config/cron/photosync.sh b/.config/cron/photosync.sh @@ -11,6 +11,13 @@ else exit -1 fi +if type -p xdg-user-dir > /dev/null 2>&1 +then + LOCAL_FOLDER=`xdg-user-dir PICTURES` +else + LOCAL_FOLDER="$HOME/Pictures" +fi + # Mount the WebDAV folder and set so only we can read it if mount /mnt/nextcloud > /dev/null 2>&1 then @@ -19,8 +26,8 @@ then # Rsync from WebDAV to ~/Photos (unidirectionally for now, in order to # preserve server space) - echo "Syncing Photos from WebDAV to ~/Photos" - rsync -aq /mnt/nextcloud/Photos /home/djmoch/ + echo "Syncing Photos from WebDAV to $LOCAL_FOLDER" + rsync -aq /mnt/nextcloud/Photos/* $LOCAL_FOLDER # Finish by unmounting the WebDAV folder echo "Unmounting nextcloud.danielmoch.com" diff --git a/.shrc b/.shrc @@ -74,7 +74,7 @@ then alias vim=vi fi -if type -p fortune > /dev/null 2>&1 && [ -n "$SSH_TTY" -a "$SHLVL" -le 1 -o \( -n "$DISPLAY" -a -z "$SSH_TTY" -a "$SHLVL" -le 2 \) ] +if type -p fortune > /dev/null 2>&1 && [ -z "$SSH_TTY" -a "$SHLVL" -le 1 -o \( -n "$DISPLAY" -a -z "$SSH_TTY" -a "$SHLVL" -le 2 \) ] then [ -n $NEWLINE ] && echo; unset NEWLINE fortune