mirror of
https://github.com/pi-hole/pi-hole
synced 2025-01-03 04:30:55 +00:00
No need to cd $PWD
as it doesn't affect flow of caller script.
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
This commit is contained in:
parent
74eb8c8622
commit
5004cf331a
@ -222,14 +222,11 @@ getGitFiles() {
|
|||||||
|
|
||||||
resetRepo() {
|
resetRepo() {
|
||||||
local directory="${1}"
|
local directory="${1}"
|
||||||
local curdir
|
|
||||||
|
|
||||||
curdir="${PWD}"
|
|
||||||
cd "${directory}" &> /dev/null || return 1
|
cd "${directory}" &> /dev/null || return 1
|
||||||
echo -n "::: Resetting repo in ${1}..."
|
echo -n "::: Resetting repo in ${1}..."
|
||||||
git reset --hard &> /dev/null || return $?
|
git reset --hard &> /dev/null || return $?
|
||||||
echo " done!"
|
echo " done!"
|
||||||
cd "${curdir}" &> /dev/null || return 1
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user