mirror of
https://github.com/mrworf/plexupdate.git
synced 2025-08-14 10:36:55 -07:00
Use bash built-in hash to check if programs exist in path
This commit is contained in:
parent
3bca4b4d47
commit
1b57528f14
1 changed files with 4 additions and 6 deletions
|
@ -66,9 +66,8 @@ DEBIAN_INSTALL="dpkg -i"
|
|||
DISTRO_INSTALL=""
|
||||
|
||||
# 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." >&2
|
||||
if hash wget 2>/dev/null; then
|
||||
echo "ERROR: This script requires wget in the path. It could also signify that you don't have the tool installed." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
@ -209,9 +208,8 @@ if [ "${QUIET}" = "yes" ]; then
|
|||
fi
|
||||
|
||||
if [ "${AUTOUPDATE}" == "yes" ]; then
|
||||
git >/dev/null 2>/dev/null
|
||||
if [ $? -eq 127 ]; then
|
||||
echo "Error: You need to have git installed for this to work" >&2
|
||||
if hash git 2>/dev/null; then
|
||||
echo "ERROR: You need to have git installed for this to work" >&2
|
||||
cronexit 1
|
||||
fi
|
||||
pushd "$(dirname "$0")" >/dev/null
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue