From 2b41eda1083c6bf6b14f009b4a317406e2740d34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81ngel=20Guzm=C3=A1n=20Maeso?= Date: Wed, 27 Jan 2016 02:17:06 +0100 Subject: [PATCH] Show a warning to user if it is not root --- install.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index d648f06..fcfc0a9 100644 --- a/install.sh +++ b/install.sh @@ -1,3 +1,8 @@ +if [ `/usr/bin/id -u` -ne 0 ]; then + echo 'Please, run this script as root' + exit 1 +fi + wget https://raw.githubusercontent.com/adamgoose/forge-cli/master/dist/forge-cli.phar sudo mv forge-cli.phar /usr/local/bin/forge -sudo chmod +x /usr/local/bin/forge \ No newline at end of file +sudo chmod +x /usr/local/bin/forge