Cusotm Theme File Sync script for specified directories with auto git commit
Running the Battron-Voltimax Theme Sync Script to avoid repeatative manual change as some direcotory contains same file and changes
# Battron-Voltimax Theme Sync
The ultimate way to ensure changes from the Battron theme gracefully
fly over to the Voltimax theme. Because, let's face it, manual copying
is just not our style anymore!
## Introduction
This script, `battron_voltimax_themes_sync_repos.sh`, is designed to perform
a one-way sync of specific directories from the Battron theme to the Voltimax theme.
With a touch of humor to keep things lively!
## The Script
```bash
#!/bin/bash
# Define the paths for both themes
BATTRON_THEME_PATH="/path/to/Battron/theme/directory"
VOLTIMAX_PATH="/path/to/Voltimax/theme/directory"
# Directories to be synchronized
directories=
("Resources/public" "Resources/snippet" "Resources/views/storefront" "Resources/form")
# Syncing the directories
for dir in "${directories[@]}"; do
rsync -avh "${BATTRON_THEME_PATH}/${dir}/" "${VOLTIMAX_PATH}/${dir}/"
done
# Move to the Voltimax directory for git operations
cd "$VOLTIMAX_PATH"
# Git add, commit, and push
git add .
git commit -m "Auto-synced changes from Battron theme on $(date '+%Y-%m-%d %H:%M:%S')"
git push
echo "πΎ Sync complete! Your changes now reside comfortably in the Voltimax theme.
Time for a coffee break, perhaps?"
Setup
Running the Script
Final Notes
Last updated