Skip to content

Commit

Permalink
installer: Tweak line for Fedora/CentOS types.
Browse files Browse the repository at this point in the history
  • Loading branch information
nooblag authored Feb 22, 2022
1 parent 3f291ea commit 4d4144b
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions pddgnimi.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,18 @@
bashInstall = """
# stop on any non-zero exit status
set -o errexit
# check to see if pip is absent, if so, attempt to install it
if [ ! -x "$(command -v pip)" ]; then
pip='python3-pip'
# try to guess some common package managers to do the install
# ubuntu/debian types
# debian/ubuntu types
if [ -x "$(command -v apt)" ]; then
installer="sudo apt update && sudo apt install ${pip}"
printf "%s\n\n" "$installer"
eval "${installer}"
# fedora/centos types
elif [ -x "$(command -v dnf)" ]; then
installer="sudo dnf install ${pip}"
installer="sudo dnf update && sudo dnf install ${pip}"
printf "%s\n\n" "$installer"
eval "${installer}"
# can't assume a package manager
Expand All @@ -52,18 +51,16 @@
exit 1
fi
fi
# ensure python dependencies are installed
pip install elemental html5lib htmlmin bs4 geckodriver_autoinstaller
printf "Software check complete.\n\n"
"""
# run bash installer
os.system(bashInstall)
exit()





### CONFIG ###
Expand Down

0 comments on commit 4d4144b

Please sign in to comment.