diff options
Diffstat (limited to 'bin')
l--------- | bin/post-receive | 1 | ||||
-rwxr-xr-x | bin/post-update | 16 | ||||
-rwxr-xr-x | bin/sync | 14 |
3 files changed, 9 insertions, 22 deletions
diff --git a/bin/post-receive b/bin/post-receive new file mode 120000 index 00000000000..f410f56620b --- /dev/null +++ b/bin/post-receive @@ -0,0 +1 @@ +../.git/annex/objects/q9/9j/SHA256E-s271--fa1b46021130b0387cae0a19086648d4b6527b8f2382de354daf1b9cca3f4ed0/SHA256E-s271--fa1b46021130b0387cae0a19086648d4b6527b8f2382de354daf1b9cca3f4ed0
\ No newline at end of file diff --git a/bin/post-update b/bin/post-update deleted file mode 100755 index 48a6a16cb27..00000000000 --- a/bin/post-update +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -cd .. -unset GIT_DIR - -if [ -d ".git/annex" ]; then - git annex sync -else - git reset HEAD - git checkout -f -fi - -git submodule update --init --recursive - -cd - -exec git update-server-info @@ -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 |