Updated January 29, 2023 8:33PM
This commit is contained in:
15
pihole-sync
15
pihole-sync
@@ -144,8 +144,8 @@ push () {
|
|||||||
git remote update > /dev/null
|
git remote update > /dev/null
|
||||||
|
|
||||||
# If local files are different than remote, update remote Git repo
|
# If local files are different than remote, update remote Git repo
|
||||||
#CHANGED=$(git --work-tree=$personal_git_dir status --porcelain)
|
CHANGED=$(git --work-tree=$personal_git_dir status --porcelain)
|
||||||
#if [ -n "${CHANGED}" ]; then
|
if [ -n "${CHANGED}" ]; then
|
||||||
echo 'Local Pi-hole lists are different than remote Git repo. Updating remote repo...';
|
echo 'Local Pi-hole lists are different than remote Git repo. Updating remote repo...';
|
||||||
rightnow=$(date +"%B %e, %Y %l:%M%p")
|
rightnow=$(date +"%B %e, %Y %l:%M%p")
|
||||||
# Remove -q option if you don't want to run in "quiet" mode
|
# Remove -q option if you don't want to run in "quiet" mode
|
||||||
@@ -153,11 +153,11 @@ push () {
|
|||||||
git push -q
|
git push -q
|
||||||
echo 'Done!';
|
echo 'Done!';
|
||||||
exit 0
|
exit 0
|
||||||
#else
|
else
|
||||||
# # If local files are the same as remote, do nothing and exit
|
# If local files are the same as remote, do nothing and exit
|
||||||
# echo 'Remote Git repo matches local Pi-hole lists. No further action required.';
|
echo 'Remote Git repo matches local Pi-hole lists. No further action required.';
|
||||||
# exit 0
|
exit 0
|
||||||
#fi
|
fi
|
||||||
}
|
}
|
||||||
pull () {
|
pull () {
|
||||||
# Go to Pi-hole directory, exit if doesn't exist
|
# Go to Pi-hole directory, exit if doesn't exist
|
||||||
@@ -189,6 +189,7 @@ pull () {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
###########################################################################
|
###########################################################################
|
||||||
# Check to see whether a command line option was provided
|
# Check to see whether a command line option was provided
|
||||||
if [ -z "$1" ]
|
if [ -z "$1" ]
|
||||||
|
|||||||
Reference in New Issue
Block a user