From dfc22eff6a7296d62164da0577725a51d31ee18d Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Fri, 18 Apr 2014 12:59:35 -0300 Subject: Adding sync_media_identity into sync-media-init --- files/sync-media-init | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/files/sync-media-init b/files/sync-media-init index 2a3f42a..b32e88c 100644 --- a/files/sync-media-init +++ b/files/sync-media-init @@ -13,6 +13,15 @@ CACHES="" VOLUMES="" BOXES="" +# Fix identity +function sync_media_identity { + if [ -z "`git config --local user.email`" ] || [ -z "`git config --local user.name`" ]; then + repo="$(basename `pwd`)" + git config user.name "${repo^} Asset Manager" + git config user.email "$repo@assset.manager" + fi +} + # Syntax check if [ -z "$VOLUME" ]; then echo "usage: $BASENAME [ [remotes]]" @@ -45,6 +54,7 @@ for file in `ls $MEDIA`; do ( echo Processing "$MEDIA/$file..." cd $MEDIA/$file + sync_media_identity if git remote | grep -q "^origin$"; then echo "Removing origin..." -- cgit v1.2.3