mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-12-25 06:10:20 +00:00
Merge pull request #1155 from pi-hole/tweak/root_first
Move distribution check to function.
This commit is contained in:
commit
34ad2157dd
1 changed files with 5 additions and 2 deletions
|
@ -53,7 +53,7 @@ reconfigure=false
|
|||
runUnattended=false
|
||||
|
||||
# Compatibility
|
||||
|
||||
distro_check() {
|
||||
if command -v apt-get &> /dev/null; then
|
||||
#Debian Family
|
||||
#############################################
|
||||
|
@ -103,8 +103,8 @@ else
|
|||
echo "OS distribution not supported"
|
||||
exit
|
||||
fi
|
||||
}
|
||||
|
||||
####### FUNCTIONS ##########
|
||||
is_repo() {
|
||||
# Use git to check if directory is currently under VCS, return the value 128
|
||||
# if directory is not a repo. Return 1 if directory does not exist.
|
||||
|
@ -1055,6 +1055,9 @@ main() {
|
|||
fi
|
||||
fi
|
||||
|
||||
# Check for supported distribution
|
||||
distro_check
|
||||
|
||||
# Check arguments for the undocumented flags
|
||||
for var in "$@"; do
|
||||
case "$var" in
|
||||
|
|
Loading…
Reference in a new issue