aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--files/sync-media-init10
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..."