diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2014-04-18 12:59:35 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2014-04-18 12:59:35 -0300 |
commit | dfc22eff6a7296d62164da0577725a51d31ee18d (patch) | |
tree | 9458dde5039c9489824a0f84cebee4ab401b553a /files | |
parent | 0618f455869e7ceb9ea2892dfe3dd7ab44593fcf (diff) | |
download | puppet-backup-dfc22eff6a7296d62164da0577725a51d31ee18d.tar.gz puppet-backup-dfc22eff6a7296d62164da0577725a51d31ee18d.tar.bz2 |
Adding sync_media_identity into sync-media-init
Diffstat (limited to 'files')
-rw-r--r-- | files/sync-media-init | 10 |
1 files changed, 10 insertions, 0 deletions
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 <volume> [<caches|volumes|boxes> [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..." |