diff options
-rwxr-xr-x | bin/sync | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -8,11 +8,13 @@ CWD="`/bin/pwd`" GIT="/usr/bin/git" NICE="/usr/bin/nice -n 19" IONICE="/user/bin/ionice -c 3" -ARCHIVE="/var/cache/sites/arquivo" +ARCHIVE="/var/cache/media/arquivo" # Run -cd $ARCHIVE -$IONICE $NICE $GIT annex add . && \ -$IONICE $NICE $GIT annex sync && \ -$IONICE $NICE $GIT annex get . &> /dev/null -cd $CWD +if [ -d "$ARCHIVE/.git/annex" ]; then + cd $ARCHIVE + $IONICE $NICE $GIT annex add . && \ + $IONICE $NICE $GIT annex sync && \ + $IONICE $NICE $GIT annex get . &> /dev/null + cd $CWD +fi |