mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-12-25 06:10:20 +00:00
- Correctly overwrite ${INFO} boxes with ${CROSS} etc
- Notify user that branch has been changed Signed-off-by: Adam Warner <adamw@rner.email>
This commit is contained in:
parent
18d0278279
commit
f38912a0c9
1 changed files with 7 additions and 3 deletions
|
@ -171,7 +171,11 @@ checkout_pull_branch() {
|
||||||
|
|
||||||
oldbranch="$(git symbolic-ref HEAD)"
|
oldbranch="$(git symbolic-ref HEAD)"
|
||||||
|
|
||||||
|
str="Switching to branch: ${branch}"
|
||||||
|
echo -ne " ${INFO} $str"
|
||||||
git checkout "${branch}" --quiet || return 1
|
git checkout "${branch}" --quiet || return 1
|
||||||
|
echo -e "${OVER} ${TICK} $str"
|
||||||
|
|
||||||
|
|
||||||
if [[ "$(git diff "${oldbranch}" | grep -c "^")" -gt "0" ]]; then
|
if [[ "$(git diff "${oldbranch}" | grep -c "^")" -gt "0" ]]; then
|
||||||
update="true"
|
update="true"
|
||||||
|
@ -180,7 +184,7 @@ checkout_pull_branch() {
|
||||||
git_pull=$(git pull || return 1)
|
git_pull=$(git pull || return 1)
|
||||||
|
|
||||||
if [[ "$git_pull" == *"up-to-date"* ]]; then
|
if [[ "$git_pull" == *"up-to-date"* ]]; then
|
||||||
echo -e " ${INFO} $(git pull)"
|
echo -e " ${INFO} ${git_pull}"
|
||||||
else
|
else
|
||||||
echo -e "$git_pull\\n"
|
echo -e "$git_pull\\n"
|
||||||
fi
|
fi
|
||||||
|
@ -271,7 +275,7 @@ checkout() {
|
||||||
str="Fetching branches from ${piholeGitUrl}"
|
str="Fetching branches from ${piholeGitUrl}"
|
||||||
echo -ne " ${INFO} $str"
|
echo -ne " ${INFO} $str"
|
||||||
if ! fully_fetch_repo "${PI_HOLE_FILES_DIR}" ; then
|
if ! fully_fetch_repo "${PI_HOLE_FILES_DIR}" ; then
|
||||||
echo -e " ${CROSS} $str"
|
echo -e "${OVER} ${CROSS} $str"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
corebranches=($(get_available_branches "${PI_HOLE_FILES_DIR}"))
|
corebranches=($(get_available_branches "${PI_HOLE_FILES_DIR}"))
|
||||||
|
@ -298,7 +302,7 @@ checkout() {
|
||||||
str="Fetching branches from ${webInterfaceGitUrl}"
|
str="Fetching branches from ${webInterfaceGitUrl}"
|
||||||
echo -ne " ${INFO} $str"
|
echo -ne " ${INFO} $str"
|
||||||
if ! fully_fetch_repo "${webInterfaceDir}" ; then
|
if ! fully_fetch_repo "${webInterfaceDir}" ; then
|
||||||
echo -e " ${CROSS} $str"
|
echo -e "${OVER} ${CROSS} $str"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
webbranches=($(get_available_branches "${webInterfaceDir}"))
|
webbranches=($(get_available_branches "${webInterfaceDir}"))
|
||||||
|
|
Loading…
Reference in a new issue