Move distribution check to function.

Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net>
This commit is contained in:
Dan Schaper 2017-01-21 12:34:47 -08:00
parent 2661ef53a2
commit 0635309f23
No known key found for this signature in database
GPG key ID: 572E999E385B7BFC

View file

@ -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