fix indents

This commit is contained in:
Philipp Holzer 2019-11-26 21:54:18 +01:00
parent b58fda500c
commit 06d228b850
No known key found for this signature in database
GPG Key ID: D8365C3D36B77D90
11 changed files with 157 additions and 157 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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