From 7e34087bc0610d2afc96e72974a4ac9a83ce20e6 Mon Sep 17 00:00:00 2001 From: snare Date: Sat, 26 Nov 2016 11:34:55 +1300 Subject: [PATCH] Only do apt-get stuff if it exists. Should probably support some other distros some time. --- install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 17470c6..8fff582 100755 --- a/install.sh +++ b/install.sh @@ -12,6 +12,7 @@ SUDO='sudo' GDB=$(command -v gdb) LLDB=$(command -v lldb) +APT_GET=$(command -v apt-get) set -x @@ -46,7 +47,7 @@ done set -e function install_apt { - if uname | grep -i Linux &>/dev/null; then + if [ -n "${APT_GET}" ]; then if [ -z "${SKIP_UPDATE}" ]; then sudo apt-get update fi