From 06d228b850f8a6fef8d9324030a244c234486078 Mon Sep 17 00:00:00 2001 From: Philipp Holzer Date: Tue, 26 Nov 2019 21:54:18 +0100 Subject: [PATCH] fix indents --- 2019.09/apache/entrypoint.sh | 14 +++--- 2019.09/fpm-alpine/entrypoint.sh | 14 +++--- 2019.09/fpm/entrypoint.sh | 14 +++--- 2019.12-dev/apache/entrypoint-dev.sh | 54 ++++++++++++------------ 2019.12-dev/apache/entrypoint.sh | 14 +++--- 2019.12-dev/fpm-alpine/entrypoint-dev.sh | 54 ++++++++++++------------ 2019.12-dev/fpm-alpine/entrypoint.sh | 14 +++--- 2019.12-dev/fpm/entrypoint-dev.sh | 54 ++++++++++++------------ 2019.12-dev/fpm/entrypoint.sh | 14 +++--- docker-entrypoint-dev.sh | 54 ++++++++++++------------ docker-entrypoint.sh | 14 +++--- 11 files changed, 157 insertions(+), 157 deletions(-) diff --git a/2019.09/apache/entrypoint.sh b/2019.09/apache/entrypoint.sh index cbdac54..b1d914a 100755 --- a/2019.09/apache/entrypoint.sh +++ b/2019.09/apache/entrypoint.sh @@ -56,18 +56,18 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then installed_version="$(cat /var/www/html/VERSION)" fi - image_version="$(cat /usr/src/friendica/VERSION)" + image_version="$(cat /usr/src/friendica/VERSION)" - # no downgrading possible - if version_greater "$installed_version" "$image_version"; then - echo 'Can'\''t copy Friendica sources because the version of the data ('$installed_version') is higher than the docker image ('$image_version')', 0 - exit 1; + # no downgrading possible + if version_greater "$installed_version" "$image_version"; then + echo 'Can'\''t copy Friendica sources because the version of the data ('$installed_version') is higher than the docker image ('$image_version')', 0 + exit 1; fi setup_ssmtp - # check it just in case the version is greater - if version_greater "$image_version" "$installed_version"; then + # check it just in case the version is greater + if version_greater "$image_version" "$installed_version"; then echo "Initializing Friendica $image_version ..." if [ "$installed_version" != "0.0.0.0" ]; then diff --git a/2019.09/fpm-alpine/entrypoint.sh b/2019.09/fpm-alpine/entrypoint.sh index cbdac54..b1d914a 100755 --- a/2019.09/fpm-alpine/entrypoint.sh +++ b/2019.09/fpm-alpine/entrypoint.sh @@ -56,18 +56,18 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then installed_version="$(cat /var/www/html/VERSION)" fi - image_version="$(cat /usr/src/friendica/VERSION)" + image_version="$(cat /usr/src/friendica/VERSION)" - # no downgrading possible - if version_greater "$installed_version" "$image_version"; then - echo 'Can'\''t copy Friendica sources because the version of the data ('$installed_version') is higher than the docker image ('$image_version')', 0 - exit 1; + # no downgrading possible + if version_greater "$installed_version" "$image_version"; then + echo 'Can'\''t copy Friendica sources because the version of the data ('$installed_version') is higher than the docker image ('$image_version')', 0 + exit 1; fi setup_ssmtp - # check it just in case the version is greater - if version_greater "$image_version" "$installed_version"; then + # check it just in case the version is greater + if version_greater "$image_version" "$installed_version"; then echo "Initializing Friendica $image_version ..." if [ "$installed_version" != "0.0.0.0" ]; then diff --git a/2019.09/fpm/entrypoint.sh b/2019.09/fpm/entrypoint.sh index cbdac54..b1d914a 100755 --- a/2019.09/fpm/entrypoint.sh +++ b/2019.09/fpm/entrypoint.sh @@ -56,18 +56,18 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then installed_version="$(cat /var/www/html/VERSION)" fi - image_version="$(cat /usr/src/friendica/VERSION)" + image_version="$(cat /usr/src/friendica/VERSION)" - # no downgrading possible - if version_greater "$installed_version" "$image_version"; then - echo 'Can'\''t copy Friendica sources because the version of the data ('$installed_version') is higher than the docker image ('$image_version')', 0 - exit 1; + # no downgrading possible + if version_greater "$installed_version" "$image_version"; then + echo 'Can'\''t copy Friendica sources because the version of the data ('$installed_version') is higher than the docker image ('$image_version')', 0 + exit 1; fi setup_ssmtp - # check it just in case the version is greater - if version_greater "$image_version" "$installed_version"; then + # check it just in case the version is greater + if version_greater "$image_version" "$installed_version"; then echo "Initializing Friendica $image_version ..." if [ "$installed_version" != "0.0.0.0" ]; then diff --git a/2019.12-dev/apache/entrypoint-dev.sh b/2019.12-dev/apache/entrypoint-dev.sh index 5efaaf2..72c1c21 100755 --- a/2019.12-dev/apache/entrypoint-dev.sh +++ b/2019.12-dev/apache/entrypoint-dev.sh @@ -3,10 +3,10 @@ set -eu # checks if the branch and repository exists check_branch() { - repo=${1:-} - branch=${2:-} - git ls-remote --heads --tags "https://github.com/$repo" | grep -E "refs/(heads|tags)/${branch}$" >/dev/null - [ "$?" -eq "0" ] + repo=${1:-} + branch=${2:-} + git ls-remote --heads --tags "https://github.com/$repo" | grep -E "refs/(heads|tags)/${branch}$" >/dev/null + [ "$?" -eq "0" ] } # clones the whole develop branch (Friendica and Addons) @@ -24,37 +24,37 @@ clone_develop() { addons_git="develop" fi - # Check if the branches exist before wiping the + # Check if the branches exist before wiping the if check_branch "$friendica_repo" "$friendica_git" && check_branch "$friendica_addons_repo" "$addons_git" ; then - echo "Downloading Friendica from GitHub '${friendica_repo}/${friendica_git}' ..." + echo "Cloning '${friendica_git}' from GitHub repository '${friendica_repo}' ..." - # Removing the whole directory first - rm -fr /usr/src/friendica - git clone -q -b ${friendica_git} "https://github.com/${friendica_repo}" /usr/src/friendica + # Removing the whole directory first + rm -fr /usr/src/friendica + git clone -q -b ${friendica_git} "https://github.com/${friendica_repo}" /usr/src/friendica - mkdir /usr/src/friendica/addon - git clone -q -b ${addons_git} "https://github.com/${friendica_addons_repo}" /usr/src/friendica/addon + mkdir /usr/src/friendica/addon + git clone -q -b ${addons_git} "https://github.com/${friendica_addons_repo}" /usr/src/friendica/addon - echo "Download finished" + echo "Download finished" - if [ ! -f /usr/src/friendica/VERSION ]; then - echo "Couldn't clone repository" - exit 1 - fi + if [ ! -f /usr/src/friendica/VERSION ]; then + echo "Couldn't clone repository" + exit 1 + fi - /usr/src/friendica/bin/composer.phar install --no-dev -d /usr/src/friendica - return 0 + /usr/src/friendica/bin/composer.phar install --no-dev -d /usr/src/friendica + return 0 - else - if check_branch "$friendica_repo" "$friendica_git"; then - echo "$friendica_repo/$friendica_git is not valid." - else - echo "$friendica_addons_repo/$addons_git is not valid." - fi - echo "Using old version." - return 1 + else + if check_branch "$friendica_repo" "$friendica_git"; then + echo "$friendica_repo/$friendica_git is not valid." + else + echo "$friendica_addons_repo/$addons_git is not valid." + fi + echo "Using old version." + return 1 - fi + fi } # just check if we execute apache or php-fpm diff --git a/2019.12-dev/apache/entrypoint.sh b/2019.12-dev/apache/entrypoint.sh index cbdac54..b1d914a 100755 --- a/2019.12-dev/apache/entrypoint.sh +++ b/2019.12-dev/apache/entrypoint.sh @@ -56,18 +56,18 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then installed_version="$(cat /var/www/html/VERSION)" fi - image_version="$(cat /usr/src/friendica/VERSION)" + image_version="$(cat /usr/src/friendica/VERSION)" - # no downgrading possible - if version_greater "$installed_version" "$image_version"; then - echo 'Can'\''t copy Friendica sources because the version of the data ('$installed_version') is higher than the docker image ('$image_version')', 0 - exit 1; + # no downgrading possible + if version_greater "$installed_version" "$image_version"; then + echo 'Can'\''t copy Friendica sources because the version of the data ('$installed_version') is higher than the docker image ('$image_version')', 0 + exit 1; fi setup_ssmtp - # check it just in case the version is greater - if version_greater "$image_version" "$installed_version"; then + # check it just in case the version is greater + if version_greater "$image_version" "$installed_version"; then echo "Initializing Friendica $image_version ..." if [ "$installed_version" != "0.0.0.0" ]; then diff --git a/2019.12-dev/fpm-alpine/entrypoint-dev.sh b/2019.12-dev/fpm-alpine/entrypoint-dev.sh index 5efaaf2..72c1c21 100755 --- a/2019.12-dev/fpm-alpine/entrypoint-dev.sh +++ b/2019.12-dev/fpm-alpine/entrypoint-dev.sh @@ -3,10 +3,10 @@ set -eu # checks if the branch and repository exists check_branch() { - repo=${1:-} - branch=${2:-} - git ls-remote --heads --tags "https://github.com/$repo" | grep -E "refs/(heads|tags)/${branch}$" >/dev/null - [ "$?" -eq "0" ] + repo=${1:-} + branch=${2:-} + git ls-remote --heads --tags "https://github.com/$repo" | grep -E "refs/(heads|tags)/${branch}$" >/dev/null + [ "$?" -eq "0" ] } # clones the whole develop branch (Friendica and Addons) @@ -24,37 +24,37 @@ clone_develop() { addons_git="develop" fi - # Check if the branches exist before wiping the + # Check if the branches exist before wiping the if check_branch "$friendica_repo" "$friendica_git" && check_branch "$friendica_addons_repo" "$addons_git" ; then - echo "Downloading Friendica from GitHub '${friendica_repo}/${friendica_git}' ..." + echo "Cloning '${friendica_git}' from GitHub repository '${friendica_repo}' ..." - # Removing the whole directory first - rm -fr /usr/src/friendica - git clone -q -b ${friendica_git} "https://github.com/${friendica_repo}" /usr/src/friendica + # Removing the whole directory first + rm -fr /usr/src/friendica + git clone -q -b ${friendica_git} "https://github.com/${friendica_repo}" /usr/src/friendica - mkdir /usr/src/friendica/addon - git clone -q -b ${addons_git} "https://github.com/${friendica_addons_repo}" /usr/src/friendica/addon + mkdir /usr/src/friendica/addon + git clone -q -b ${addons_git} "https://github.com/${friendica_addons_repo}" /usr/src/friendica/addon - echo "Download finished" + echo "Download finished" - if [ ! -f /usr/src/friendica/VERSION ]; then - echo "Couldn't clone repository" - exit 1 - fi + if [ ! -f /usr/src/friendica/VERSION ]; then + echo "Couldn't clone repository" + exit 1 + fi - /usr/src/friendica/bin/composer.phar install --no-dev -d /usr/src/friendica - return 0 + /usr/src/friendica/bin/composer.phar install --no-dev -d /usr/src/friendica + return 0 - else - if check_branch "$friendica_repo" "$friendica_git"; then - echo "$friendica_repo/$friendica_git is not valid." - else - echo "$friendica_addons_repo/$addons_git is not valid." - fi - echo "Using old version." - return 1 + else + if check_branch "$friendica_repo" "$friendica_git"; then + echo "$friendica_repo/$friendica_git is not valid." + else + echo "$friendica_addons_repo/$addons_git is not valid." + fi + echo "Using old version." + return 1 - fi + fi } # just check if we execute apache or php-fpm diff --git a/2019.12-dev/fpm-alpine/entrypoint.sh b/2019.12-dev/fpm-alpine/entrypoint.sh index cbdac54..b1d914a 100755 --- a/2019.12-dev/fpm-alpine/entrypoint.sh +++ b/2019.12-dev/fpm-alpine/entrypoint.sh @@ -56,18 +56,18 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then installed_version="$(cat /var/www/html/VERSION)" fi - image_version="$(cat /usr/src/friendica/VERSION)" + image_version="$(cat /usr/src/friendica/VERSION)" - # no downgrading possible - if version_greater "$installed_version" "$image_version"; then - echo 'Can'\''t copy Friendica sources because the version of the data ('$installed_version') is higher than the docker image ('$image_version')', 0 - exit 1; + # no downgrading possible + if version_greater "$installed_version" "$image_version"; then + echo 'Can'\''t copy Friendica sources because the version of the data ('$installed_version') is higher than the docker image ('$image_version')', 0 + exit 1; fi setup_ssmtp - # check it just in case the version is greater - if version_greater "$image_version" "$installed_version"; then + # check it just in case the version is greater + if version_greater "$image_version" "$installed_version"; then echo "Initializing Friendica $image_version ..." if [ "$installed_version" != "0.0.0.0" ]; then diff --git a/2019.12-dev/fpm/entrypoint-dev.sh b/2019.12-dev/fpm/entrypoint-dev.sh index 5efaaf2..72c1c21 100755 --- a/2019.12-dev/fpm/entrypoint-dev.sh +++ b/2019.12-dev/fpm/entrypoint-dev.sh @@ -3,10 +3,10 @@ set -eu # checks if the branch and repository exists check_branch() { - repo=${1:-} - branch=${2:-} - git ls-remote --heads --tags "https://github.com/$repo" | grep -E "refs/(heads|tags)/${branch}$" >/dev/null - [ "$?" -eq "0" ] + repo=${1:-} + branch=${2:-} + git ls-remote --heads --tags "https://github.com/$repo" | grep -E "refs/(heads|tags)/${branch}$" >/dev/null + [ "$?" -eq "0" ] } # clones the whole develop branch (Friendica and Addons) @@ -24,37 +24,37 @@ clone_develop() { addons_git="develop" fi - # Check if the branches exist before wiping the + # Check if the branches exist before wiping the if check_branch "$friendica_repo" "$friendica_git" && check_branch "$friendica_addons_repo" "$addons_git" ; then - echo "Downloading Friendica from GitHub '${friendica_repo}/${friendica_git}' ..." + echo "Cloning '${friendica_git}' from GitHub repository '${friendica_repo}' ..." - # Removing the whole directory first - rm -fr /usr/src/friendica - git clone -q -b ${friendica_git} "https://github.com/${friendica_repo}" /usr/src/friendica + # Removing the whole directory first + rm -fr /usr/src/friendica + git clone -q -b ${friendica_git} "https://github.com/${friendica_repo}" /usr/src/friendica - mkdir /usr/src/friendica/addon - git clone -q -b ${addons_git} "https://github.com/${friendica_addons_repo}" /usr/src/friendica/addon + mkdir /usr/src/friendica/addon + git clone -q -b ${addons_git} "https://github.com/${friendica_addons_repo}" /usr/src/friendica/addon - echo "Download finished" + echo "Download finished" - if [ ! -f /usr/src/friendica/VERSION ]; then - echo "Couldn't clone repository" - exit 1 - fi + if [ ! -f /usr/src/friendica/VERSION ]; then + echo "Couldn't clone repository" + exit 1 + fi - /usr/src/friendica/bin/composer.phar install --no-dev -d /usr/src/friendica - return 0 + /usr/src/friendica/bin/composer.phar install --no-dev -d /usr/src/friendica + return 0 - else - if check_branch "$friendica_repo" "$friendica_git"; then - echo "$friendica_repo/$friendica_git is not valid." - else - echo "$friendica_addons_repo/$addons_git is not valid." - fi - echo "Using old version." - return 1 + else + if check_branch "$friendica_repo" "$friendica_git"; then + echo "$friendica_repo/$friendica_git is not valid." + else + echo "$friendica_addons_repo/$addons_git is not valid." + fi + echo "Using old version." + return 1 - fi + fi } # just check if we execute apache or php-fpm diff --git a/2019.12-dev/fpm/entrypoint.sh b/2019.12-dev/fpm/entrypoint.sh index cbdac54..b1d914a 100755 --- a/2019.12-dev/fpm/entrypoint.sh +++ b/2019.12-dev/fpm/entrypoint.sh @@ -56,18 +56,18 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then installed_version="$(cat /var/www/html/VERSION)" fi - image_version="$(cat /usr/src/friendica/VERSION)" + image_version="$(cat /usr/src/friendica/VERSION)" - # no downgrading possible - if version_greater "$installed_version" "$image_version"; then - echo 'Can'\''t copy Friendica sources because the version of the data ('$installed_version') is higher than the docker image ('$image_version')', 0 - exit 1; + # no downgrading possible + if version_greater "$installed_version" "$image_version"; then + echo 'Can'\''t copy Friendica sources because the version of the data ('$installed_version') is higher than the docker image ('$image_version')', 0 + exit 1; fi setup_ssmtp - # check it just in case the version is greater - if version_greater "$image_version" "$installed_version"; then + # check it just in case the version is greater + if version_greater "$image_version" "$installed_version"; then echo "Initializing Friendica $image_version ..." if [ "$installed_version" != "0.0.0.0" ]; then diff --git a/docker-entrypoint-dev.sh b/docker-entrypoint-dev.sh index 160f98d..72c1c21 100755 --- a/docker-entrypoint-dev.sh +++ b/docker-entrypoint-dev.sh @@ -3,10 +3,10 @@ set -eu # checks if the branch and repository exists check_branch() { - repo=${1:-} - branch=${2:-} - git ls-remote --heads --tags "https://github.com/$repo" | grep -E "refs/(heads|tags)/${branch}$" >/dev/null - [ "$?" -eq "0" ] + repo=${1:-} + branch=${2:-} + git ls-remote --heads --tags "https://github.com/$repo" | grep -E "refs/(heads|tags)/${branch}$" >/dev/null + [ "$?" -eq "0" ] } # clones the whole develop branch (Friendica and Addons) @@ -24,37 +24,37 @@ clone_develop() { addons_git="develop" fi - # Check if the branches exist before wiping the + # Check if the branches exist before wiping the if check_branch "$friendica_repo" "$friendica_git" && check_branch "$friendica_addons_repo" "$addons_git" ; then - echo "Cloning '${friendica_git}' from GitHub repository '${friendica_repo}' ..." + echo "Cloning '${friendica_git}' from GitHub repository '${friendica_repo}' ..." - # Removing the whole directory first - rm -fr /usr/src/friendica - git clone -q -b ${friendica_git} "https://github.com/${friendica_repo}" /usr/src/friendica + # Removing the whole directory first + rm -fr /usr/src/friendica + git clone -q -b ${friendica_git} "https://github.com/${friendica_repo}" /usr/src/friendica - mkdir /usr/src/friendica/addon - git clone -q -b ${addons_git} "https://github.com/${friendica_addons_repo}" /usr/src/friendica/addon + mkdir /usr/src/friendica/addon + git clone -q -b ${addons_git} "https://github.com/${friendica_addons_repo}" /usr/src/friendica/addon - echo "Download finished" + echo "Download finished" - if [ ! -f /usr/src/friendica/VERSION ]; then - echo "Couldn't clone repository" - exit 1 - fi + if [ ! -f /usr/src/friendica/VERSION ]; then + echo "Couldn't clone repository" + exit 1 + fi - /usr/src/friendica/bin/composer.phar install --no-dev -d /usr/src/friendica - return 0 + /usr/src/friendica/bin/composer.phar install --no-dev -d /usr/src/friendica + return 0 - else - if check_branch "$friendica_repo" "$friendica_git"; then - echo "$friendica_repo/$friendica_git is not valid." - else - echo "$friendica_addons_repo/$addons_git is not valid." - fi - echo "Using old version." - return 1 + else + if check_branch "$friendica_repo" "$friendica_git"; then + echo "$friendica_repo/$friendica_git is not valid." + else + echo "$friendica_addons_repo/$addons_git is not valid." + fi + echo "Using old version." + return 1 - fi + fi } # just check if we execute apache or php-fpm diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index cbdac54..b1d914a 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -56,18 +56,18 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ]; then installed_version="$(cat /var/www/html/VERSION)" fi - image_version="$(cat /usr/src/friendica/VERSION)" + image_version="$(cat /usr/src/friendica/VERSION)" - # no downgrading possible - if version_greater "$installed_version" "$image_version"; then - echo 'Can'\''t copy Friendica sources because the version of the data ('$installed_version') is higher than the docker image ('$image_version')', 0 - exit 1; + # no downgrading possible + if version_greater "$installed_version" "$image_version"; then + echo 'Can'\''t copy Friendica sources because the version of the data ('$installed_version') is higher than the docker image ('$image_version')', 0 + exit 1; fi setup_ssmtp - # check it just in case the version is greater - if version_greater "$image_version" "$installed_version"; then + # check it just in case the version is greater + if version_greater "$image_version" "$installed_version"; then echo "Initializing Friendica $image_version ..." if [ "$installed_version" != "0.0.0.0" ]; then