Files
dotfiles/scripts/commit-dotfiles.sh
2025-01-03 10:00:00 -05:00

17 lines
339 B
Bash

#!/bin/bash
# Navigate to the repository
cd ~/dotfiles || exit
brew bundle dump --file=~/dotfiles/Brewfile --force
# Check for changes
if [[ $(git status --porcelain) ]]; then
# There are changes, commit them
git add .
git commit -m "$(date +"%Y-%m-%d")"
git push origin $BRANCH
else
echo "No changes to commit."
fi