Added wget check to avoid issues downloading

This commit is contained in:
Henric Andersson 2014-10-04 14:44:42 -07:00
commit 856f9833bf

View file

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# #
# Plex Linux Server download tool v2.6.2 # Plex Linux Server download tool v2.6.3
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# This tool will download the latest version of Plex Media # This tool will download the latest version of Plex Media
# Server for Linux. It supports both the public versions # Server for Linux. It supports both the public versions
@ -37,6 +37,7 @@
# 2.6 Support for redhat derived distributions # 2.6 Support for redhat derived distributions
# 2.6.2 Merge download dir support and moved config sourcing # 2.6.2 Merge download dir support and moved config sourcing
# (per request) # (per request)
# 2.6.3 Added detection for wget to avoid issues downloading
# #
################################################################# #################################################################
# Set these two to what you need, or create a .plexupdate file # Set these two to what you need, or create a .plexupdate file
@ -59,6 +60,13 @@ FORCE=no
PUBLIC=no PUBLIC=no
AUTOINSTALL=no AUTOINSTALL=no
# Sanity, make sure wget is in our path...
wget >/dev/null 2>/dev/null
if [ $? -eq 127 ]; then
echo "Error: This script requires wget in the path. It could also signify that you don't have the tool installed."
exit 1
fi
# Load settings from config file if it exists # Load settings from config file if it exists
if [ -f ~/.plexupdate ]; then if [ -f ~/.plexupdate ]; then
source ~/.plexupdate source ~/.plexupdate