Fixes on deployment

This commit is contained in:
Marc Aymerich 2015-10-02 12:23:18 +00:00
parent 7dd9459ea0
commit 45094714a8
1 changed files with 10 additions and 10 deletions

View File

@ -6,6 +6,16 @@ set -ue
# bash <( curl https://raw.githubusercontent.com/glic3rinu/django-orchestra/master/scripts/containers/deploy.sh ) [--noinput username] # bash <( curl https://raw.githubusercontent.com/glic3rinu/django-orchestra/master/scripts/containers/deploy.sh ) [--noinput username]
function main () { function main () {
run_ () {
echo " ${bold}\$ ${@}${normal}"
${@}
}
surun_ () {
echo " ${bold}\$ su $user -c \"${@}\"${normal}"
su $user -c "${@}"
}
noinput='' noinput=''
user=$USER user=$USER
if [[ $# -eq 2 ]]; then if [[ $# -eq 2 ]]; then
@ -42,16 +52,6 @@ function main () {
sudo true sudo true
fi fi
run_ () {
echo " ${bold}\$ ${@}${normal}"
${@}
}
surun_ () {
echo " ${bold}\$ su $user -c \"${@}\"${normal}"
su $user -c "${@}"
}
bold=$(tput -T ${TERM:-xterm} bold) bold=$(tput -T ${TERM:-xterm} bold)
normal=$(tput -T ${TERM:-xterm} sgr0) normal=$(tput -T ${TERM:-xterm} sgr0)