Follow bashstyle where possible

This commit is contained in:
Jose Diaz-Gonzalez
2015-09-14 21:20:35 -07:00
parent 1c53250211
commit 27a2478a33
20 changed files with 89 additions and 89 deletions

View File

@@ -18,7 +18,7 @@ dokku_log_info2() {
}
dokku_log_info1_quiet() {
if [[ -z "$DOKKU_QUIET_OUTPUT" ]];then
if [[ -z "$DOKKU_QUIET_OUTPUT" ]]; then
echo "-----> $@"
else
return 0
@@ -26,7 +26,7 @@ dokku_log_info1_quiet() {
}
dokku_log_info2_quiet() {
if [[ -z "$DOKKU_QUIET_OUTPUT" ]];then
if [[ -z "$DOKKU_QUIET_OUTPUT" ]]; then
echo "=====> $@"
else
return 0
@@ -38,7 +38,7 @@ dokku_col_log_info1() {
}
dokku_col_log_info1_quiet() {
if [[ -z "$DOKKU_QUIET_OUTPUT" ]];then
if [[ -z "$DOKKU_QUIET_OUTPUT" ]]; then
printf "%-25s %-25s %-25s %-25s\n" "-----> $@"
else
return 0
@@ -50,7 +50,7 @@ dokku_col_log_info2() {
}
dokku_col_log_info2_quiet() {
if [[ -z "$DOKKU_QUIET_OUTPUT" ]];then
if [[ -z "$DOKKU_QUIET_OUTPUT" ]]; then
printf "%-25s %-25s %-25s %-25s\n" "=====> $@"
else
return 0
@@ -62,7 +62,7 @@ dokku_col_log_msg() {
}
dokku_col_log_msg_quiet() {
if [[ -z "$DOKKU_QUIET_OUTPUT" ]];then
if [[ -z "$DOKKU_QUIET_OUTPUT" ]]; then
printf "%-25s %-25s %-25s %-25s\n" "$@"
else
return 0
@@ -70,7 +70,7 @@ dokku_col_log_msg_quiet() {
}
dokku_log_verbose_quiet() {
if [[ -z "$DOKKU_QUIET_OUTPUT" ]];then
if [[ -z "$DOKKU_QUIET_OUTPUT" ]]; then
echo " $@"
else
return 0
@@ -170,7 +170,7 @@ is_image_herokuish_based() {
is_number() {
local NUMBER=$1; local NUM_RE='^[0-9]+$'
if [[ $NUMBER =~ $NUM_RE ]];then
if [[ $NUMBER =~ $NUM_RE ]]; then
return 0
else
return 1
@@ -247,7 +247,7 @@ get_app_running_container_ids() {
! (is_deployed $APP) && dokku_log_fail "App $APP has not been deployed"
local CIDS=$(get_app_container_ids $APP)
for CID in $CIDS;do
for CID in $CIDS; do
local APP_CONTAINER_STATUS=$(docker inspect -f '{{.State.Running}}' "$CID" || true)
[[ "$APP_CONTAINER_STATUS" == "true" ]] && local APP_RUNNING_CONTAINER_IDS+="$CID "
done
@@ -257,7 +257,7 @@ get_app_running_container_ids() {
is_deployed() {
local APP="$1"
if [[ -f "$DOKKU_ROOT/$APP/CONTAINER" ]] || [[ $(ls $DOKKU_ROOT/$APP/CONTAINER.* &> /dev/null; echo $?) -eq 0 ]];then
if [[ -f "$DOKKU_ROOT/$APP/CONTAINER" ]] || [[ $(ls $DOKKU_ROOT/$APP/CONTAINER.* &> /dev/null; echo $?) -eq 0 ]]; then
return 0
else
return 1