Fix indentation
This commit is contained in:
parent
654ddeae23
commit
5d79969947
@ -3,7 +3,7 @@ set -eu
|
|||||||
|
|
||||||
# version_greater A B returns whether A > B
|
# version_greater A B returns whether A > B
|
||||||
version_greater() {
|
version_greater() {
|
||||||
[ "$(printf '%s\n' "$@" | sort -t '.' -n -k1,1 -k2,2 -k3,3 -k4,4 | head -n 1)" != "$1" ]
|
[ "$(printf '%s\n' "$@" | sort -t '.' -n -k1,1 -k2,2 -k3,3 -k4,4 | head -n 1)" != "$1" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
# return true if specified directory is empty
|
# return true if specified directory is empty
|
||||||
@ -12,11 +12,11 @@ directory_empty() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
run_as() {
|
run_as() {
|
||||||
if [ "$(id -u)" = 0 ]; then
|
if [ "$(id -u)" = 0 ]; then
|
||||||
su - www-data -s /bin/sh -c "$1"
|
su - www-data -s /bin/sh -c "$1"
|
||||||
else
|
else
|
||||||
sh -c "$1"
|
sh -c "$1"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
installed_version="0.0.0.0"
|
installed_version="0.0.0.0"
|
||||||
@ -37,9 +37,9 @@ if version_greater "$image_version" "$installed_version"; then
|
|||||||
run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_before
|
run_as 'php /var/www/html/occ app:list' | sed -n "/Enabled:/,/Disabled:/p" > /tmp/list_before
|
||||||
fi
|
fi
|
||||||
if [ "$(id -u)" = 0 ]; then
|
if [ "$(id -u)" = 0 ]; then
|
||||||
rsync_options="-rlDog --chown www-data:root"
|
rsync_options="-rlDog --chown www-data:root"
|
||||||
else
|
else
|
||||||
rsync_options="-rlD"
|
rsync_options="-rlD"
|
||||||
fi
|
fi
|
||||||
rsync $rsync_options --delete --exclude /config/ --exclude /data/ --exclude /custom_apps/ --exclude /themes/ /usr/src/nextcloud/ /var/www/html/
|
rsync $rsync_options --delete --exclude /config/ --exclude /data/ --exclude /custom_apps/ --exclude /themes/ /usr/src/nextcloud/ /var/www/html/
|
||||||
|
|
||||||
|
@ -60,8 +60,8 @@ function create_variant() {
|
|||||||
# Create the version+variant directory with a Dockerfile.
|
# Create the version+variant directory with a Dockerfile.
|
||||||
mkdir -p "$dir"
|
mkdir -p "$dir"
|
||||||
|
|
||||||
template="Dockerfile-${base[$variant]}.template"
|
template="Dockerfile-${base[$variant]}.template"
|
||||||
echo "# DO NOT EDIT: created by update.sh from $template" > "$dir/Dockerfile"
|
echo "# DO NOT EDIT: created by update.sh from $template" > "$dir/Dockerfile"
|
||||||
cat "$template" >> "$dir/Dockerfile"
|
cat "$template" >> "$dir/Dockerfile"
|
||||||
|
|
||||||
echo "updating $fullversion [$1] $variant"
|
echo "updating $fullversion [$1] $variant"
|
||||||
|
Loading…
Reference in New Issue
Block a user