HomelabOS/git_sync.sh

10 lines
261 B
Bash
Executable File
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

mkdir -p settings > /dev/null 2>&1
# If there is a git repo, then attempt to update
if [ -d settings/.git/ ]; then
cd settings
echo "Git Sync: "
git pull
git add * > /dev/null
git commit -a -m "Settings update"
git push > /dev/null
fi