Skip to content

Commit

Permalink
Add other Linux package managers to setup script (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
emileferreira authored May 26, 2023
1 parent 179ee61 commit ae5950e
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,19 @@ if [ "$(uname)" == "Darwin" ]; then
HOMEBREW_NO_AUTO_UPDATE=1 brew install rlwrap
fi
elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then
sudo apt-get install graphviz
sudo apt-get install rlwrap
if which apt-get > /dev/null 2>&1; then
sudo apt-get install graphviz rlwrap
elif which pacman > /dev/null 2>&1; then
sudo pacman -S --needed graphviz rlwrap
elif which dnf > /dev/null 2>&1; then
sudo dnf install graphviz rlwrap
elif which emerge > /dev/null 2>&1; then
sudo emerge --ask media-gfx/graphviz app-misc/rlwrap
else
echo "Attempted to install graphviz and rlwrap, but your package manager is not supported by this script. Consider installing them manually:"
echo $rlwrap_desc
echo $graphviz_desc
fi
else
echo "For the best experience, you should install graphviz and rlwrap."
echo "I'm sorry, I don't know how to do this on your OS (please email me with OS+directions if you do, so I can update!)"
Expand All @@ -30,4 +41,4 @@ python3 -m venv ./raspenv
source raspenv/bin/activate
pip3 install antlr4-python3-runtime==4.9.1
pip3 install graphviz
deactivate
deactivate

0 comments on commit ae5950e

Please sign in to comment.