From 00a2251823f133ccc730de9cfc4867080e50fd0f Mon Sep 17 00:00:00 2001 From: Marcus Whybrow Date: Sat, 3 Nov 2012 21:20:16 +0000 Subject: [PATCH] Move install process to a sourceable function --- installers/common.sh | 30 ++++++++++++++++++++++++++++++ installers/debian.sh | 2 +- installers/install.sh | 27 --------------------------- installers/redhat.sh | 2 +- 4 files changed, 32 insertions(+), 29 deletions(-) delete mode 100644 installers/install.sh diff --git a/installers/common.sh b/installers/common.sh index cbdc5c8..96ee783 100644 --- a/installers/common.sh +++ b/installers/common.sh @@ -141,3 +141,33 @@ function update_msm() { function install_complete() { install_log "Done. Type 'msm help' to get started. Have fun!" } + +function install() { + echo "This script requires superuser access to install files to /etc." + echo "You will be prompted for your password by sudo." + + # Clear existing sudo credentials + sudo -k + + # Run install functions as sudo + # These functions are defined in another script + # after which this script is sourced + sudo sh <