17 lines
339 B
Bash
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
|