From 957510b6d95f0fa34bd6cf6e76be53ab4389e429 Mon Sep 17 00:00:00 2001 From: Philipp Hagemeister Date: Thu, 1 Aug 2013 17:18:17 +0200 Subject: [PATCH] Abort on error On a (debian) system without sudo, lots of messages rush by, and it's not obvious was fails. With this change, the log looks like: $ bash install-beef bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8) ====================================== BeEF Installer ====================================== CAUTION: This installation script will install a number of BeEF dependencies including the Ruby-RVM environemnt and it's dependencies. In rare cases, this may lead to unexpected behaviour or package conflicts on some systems. Are you sure you wish to continue (Y/n)? Detecting OS.. Debian/Ubuntu Detected Installing Prerequisite Packages.. install-beef: line 74: sudo: command not found which is far more informative. --- install-beef | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install-beef b/install-beef index a91892af9..295058d62 100644 --- a/install-beef +++ b/install-beef @@ -5,6 +5,8 @@ # See the file 'doc/COPYING' for copying permission # +set -e + clear echo "======================================" echo " BeEF Installer "