diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2016-03-17 09:40:33 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2016-03-17 09:40:33 -0300 |
commit | 135d249ee64b4af139329e8d06646b3772dd2fa7 (patch) | |
tree | 23b048ee58414a0fee4b4d2602ea00c18e9449fd | |
parent | 525463967ce54100c5c9744438aae612a61dd03f (diff) | |
download | puppet-backup-135d249ee64b4af139329e8d06646b3772dd2fa7.tar.gz puppet-backup-135d249ee64b4af139329e8d06646b3772dd2fa7.tar.bz2 |
Ensure we have a reference to the remote repository at sync-media
-rw-r--r-- | files/sync-media | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/files/sync-media b/files/sync-media index 6864e2b..64e3f02 100644 --- a/files/sync-media +++ b/files/sync-media @@ -106,6 +106,14 @@ if [ -d "$CACHE" ]; then find playlists -type d -exec sudo chmod 775 {} \; fi + # Ensure we have a reference to the remote repository + if [ -d "$VOLUME/$MEDIA/$folder/git/.annex" ]; then + # Check remote + if ! git remote | grep -q "^$REMOTE$"; then + git remote add $REMOTE $VOLUME/$MEDIA/$folder + fi + fi + sync_media_identity sync_media_add git annex sync |