mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-12-23 21:30:17 +00:00
Break down is_repo
to make sure it does what is expected.
This commit is contained in:
parent
807b60b0e6
commit
5fef5f1ed4
1 changed files with 7 additions and 1 deletions
|
@ -49,7 +49,13 @@ is_repo() {
|
|||
# Use git to check if directory is currently under VCS
|
||||
echo -n "::: Checking $1 is a repo..."
|
||||
cd "${1}" &> /dev/null || return 1
|
||||
git status &> /dev/null && echo " OK!"; return 0 || echo " not found!"; return 1
|
||||
if [[ $(git status --short) ]]; then
|
||||
echo " OK!"
|
||||
return 0
|
||||
else
|
||||
echo " not found!"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
make_repo() {
|
||||
|
|
Loading…
Reference in a new issue