From e25fe305f0b20c4b4e31444ceaccea4d4332665a Mon Sep 17 00:00:00 2001 From: Marc Aymerich Date: Fri, 2 Oct 2015 12:39:04 +0000 Subject: [PATCH] Fixes on deployment --- scripts/containers/deploy.sh | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/scripts/containers/deploy.sh b/scripts/containers/deploy.sh index 9b5bd33c..571b16e4 100644 --- a/scripts/containers/deploy.sh +++ b/scripts/containers/deploy.sh @@ -30,8 +30,14 @@ function main () { exit 1 } noinput='--noinput' - alias run=run_ - alias surun=su_run + run () { + echo " ${bold}\$ ${@}${normal}" + ${@} + } + surun () { + echo " ${bold}\$ su $user -c \"${@}\"${normal}" + su $user -c "${@}" + } user=$2 elif [[ $# -eq 1 ]]; then if [[ $1 != '--noinput' ]]; then @@ -45,8 +51,14 @@ function main () { echo -e "\nErr. This script should run as a regular user\n" >&2 exit 1 } - alias run=run_ - alias surun=surun_ + run () { + echo " ${bold}\$ ${@}${normal}" + ${@} + } + surun () { + echo " ${bold}\$ ${@}${normal}" + ${@} + } # Test sudo privileges sudo true fi