summaryrefslogtreecommitdiff
path: root/install.sh
diff options
context:
space:
mode:
authorliv <819880950@qq.com>2019-03-28 10:51:54 +0100
committerliv <819880950@qq.com>2019-03-28 10:51:54 +0100
commit1b3469f236bc6979c27f6e1a04e4138a88e55de3 (patch)
treec7137a35a731f2713ded1cc2fb1c36e3ece895de /install.sh
parentc6765eb3eb4a280ecf6081cee538caf855cd2218 (diff)
make installation command checks more thorough
Diffstat (limited to 'install.sh')
-rwxr-xr-xinstall.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/install.sh b/install.sh
index b07a6a7..5a9b727 100755
--- a/install.sh
+++ b/install.sh
@@ -3,7 +3,7 @@
echo "Let's get you set up with Rustlings!"
echo "Checking requirements..."
-if [ -x "$(git)" ]
+if [ -x "$(command -v git)" ]
then
echo "WARNING: Git does not seem to be installed."
echo "Please download Git using your package manager or over https://git-scm.com/!"
@@ -12,7 +12,7 @@ else
echo "SUCCESS: Git is installed"
fi
-if [ -x "$(rustc)" ]
+if [ -x "$(command -v rustc)" ]
then
echo "WARNING: Rust does not seem to be installed."
echo "Please download Rust using https://rustup.rs!"
@@ -21,7 +21,7 @@ else
echo "SUCCESS: Rust is installed"
fi
-if [ -x "$(cargo)" ]
+if [ -x "$(command -v cargo)" ]
then
echo "WARNING: Cargo does not seem to be installed."
echo "Please download Rust and Cargo using https://rustup.rs!"