From 499c9783f6e4de0e5a5845af037e85fc3107ca72 Mon Sep 17 00:00:00 2001 From: Liam Galvin Date: Tue, 17 Dec 2019 16:57:16 +0000 Subject: [PATCH] add support for installer being run by root - handy for kali VM :p --- scripts/install.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/install.sh b/scripts/install.sh index 258d921..5dd87b6 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -11,6 +11,9 @@ curl -s -L -H "Accept: application/octet-stream" "${asset}" --output ./scout echo "Installing scout..." chmod +x ./scout installdir="${HOME}/bin/" +if [ "$EUID" -ne 0 ]; then + installdir="/usr/local/bin/" +fi mkdir -p $installdir mv ./scout "${installdir}/scout" which scout &> /dev/null || (echo "Please add ${installdir} to your PATH to complete installation!" && exit 1)