From 62a22b242a1fe05828c88fad657d2caca4dc1537 Mon Sep 17 00:00:00 2001 From: MisterSheeple <27652712+MisterSheeple@users.noreply.github.com> Date: Mon, 5 Aug 2024 05:45:05 +0000 Subject: [PATCH] Improve existence checks --- docker-setup.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docker-setup.sh b/docker-setup.sh index 8acf7a8b..65453b80 100644 --- a/docker-setup.sh +++ b/docker-setup.sh @@ -1,8 +1,8 @@ echo "Please ensure Docker is installed before continuing." read -p "Press Enter to continue or CTRL-C to exit." -if [ -e /bin/curl ]; then +if command -v curl &> /dev/null; then curl -O https://files.decomp.dev/compilers_latest.zip -elif [ -e /bin/wget ]; then +elif command -v wget &> /dev/null; then wget https://files.decomp.dev/compilers_latest.zip else echo "You do not seem to have curl or wget installed on this system. Please install one or the other to continue." @@ -10,7 +10,7 @@ else fi mkdir compilers_temp -if [ -e /bin/unzip ]; then +if command -v unzip &> /dev/null; then unzip compilers_latest.zip -d compilers_temp else echo "You do not seem to have unzip installed on this system. Please install it to continue."