From dd65c94e9b6facfd9edca06599ce8ca30bf8e140 Mon Sep 17 00:00:00 2001 From: Botspot Date: Mon, 8 Feb 2021 10:33:26 -0600 Subject: [PATCH] node.js exit if curl missing --- apps/Node.js/install | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/Node.js/install b/apps/Node.js/install index 0e4c86e..0ef1d95 100755 --- a/apps/Node.js/install +++ b/apps/Node.js/install @@ -12,7 +12,12 @@ if [ ! -z "$(cat /proc/cpuinfo | grep ARMv6)" ];then error "armv6 cpu not supported" fi -"${DIRECTORY}/pkg-install" "curl" "$(dirname "$0")" || exit 1 +if ! command -v curl >/dev/null ; then + echo -e "\033[0;31mcurl: command not found.\e[39m +You need to install curl first. If you are on a debian system, this command should install it: +\e[4msudo apt install curl\e[0m" + exit 1 +fi #Add NodeSource repo: curl -sL https://deb.nodesource.com/setup_15.x | sudo -E bash - || error "Failed to add Nodesource repo!"