From 7261d3afcd177305240320437fd9e2d927dd8cb3 Mon Sep 17 00:00:00 2001 From: Sencer Selcuk Date: Fri, 20 Jun 2014 12:43:25 -0400 Subject: [PATCH] allow installation with sudo privileges --- install | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/install b/install index bc1fbbb..fd7d49e 100755 --- a/install +++ b/install @@ -28,7 +28,11 @@ if [ $? -eq 0 ]; then else echo "Not found" echo "Installing 'curses' gem ... " - /usr/bin/env gem install curses -v 1.0.0 --user-install + if (( EUID )); then + /usr/bin/env gem install curses -v 1.0.0 --user-install + else + /usr/bin/env gem install curses -v 1.0.0 + fi if [ $? -ne 0 ]; then echo echo "Failed to install 'curses' gem."