aboutsummaryrefslogtreecommitdiff
path: root/Docker
diff options
context:
space:
mode:
authorGravatar Frans de Jonge <fransdejonge@gmail.com> 2019-07-22 16:07:40 +0200
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2019-07-22 16:07:40 +0200
commitad92518fe44279b69308aaf0a757469f5bf42910 (patch)
tree4d85581537d53095346e5d443c156e49b41b6053 /Docker
parent71270e4d5c7f0645a31a8dc7ccc56cea6a9711b0 (diff)
[CI] Run shellcheck and shfmt (#2454)
* [CI] Run shellcheck and shfmt Cf. https://github.com/FreshRSS/FreshRSS/pull/2436#discussion_r305640019 * rename * no need for disable anymore * also remove leftover indentation flags even if it makes no difference to syntax checking * define colors and reset before exit for local use
Diffstat (limited to 'Docker')
-rwxr-xr-xDocker/entrypoint.sh11
-rwxr-xr-xDocker/hooks/build5
-rwxr-xr-xDocker/hooks/pre_build3
3 files changed, 10 insertions, 9 deletions
diff --git a/Docker/entrypoint.sh b/Docker/entrypoint.sh
index b7a961569..bb0e1bde0 100755
--- a/Docker/entrypoint.sh
+++ b/Docker/entrypoint.sh
@@ -1,15 +1,18 @@
#!/bin/sh
-php -f ./cli/prepare.php > /dev/null
+php -f ./cli/prepare.php >/dev/null
chown -R :www-data .
chmod -R g+r . && chmod -R g+w ./data/
-find /etc/php*/ -name php.ini -exec sed -r -i "\#^;?date.timezone#s#^.*#date.timezone = $TZ#" {} \;
+find /etc/php*/ -name php.ini -exec sed -r -i "\\#^;?date.timezone#s#^.*#date.timezone = $TZ#" {} \;
if [ -n "$CRON_MIN" ]; then
- (echo "export TZ=$TZ" ; echo "export COPY_SYSLOG_TO_STDERR=$COPY_SYSLOG_TO_STDERR") > /var/www/FreshRSS/Docker/env.txt
- crontab -l | sed -r "\#FreshRSS#s#^[^ ]+ #$CRON_MIN #" | crontab -
+ (
+ echo "export TZ=$TZ"
+ echo "export COPY_SYSLOG_TO_STDERR=$COPY_SYSLOG_TO_STDERR"
+ ) >/var/www/FreshRSS/Docker/env.txt
+ crontab -l | sed -r "\\#FreshRSS#s#^[^ ]+ #$CRON_MIN #" | crontab -
fi
exec "$@"
diff --git a/Docker/hooks/build b/Docker/hooks/build
index 73bc90e74..84e759a80 100755
--- a/Docker/hooks/build
+++ b/Docker/hooks/build
@@ -1,11 +1,10 @@
#!/bin/bash
cd ..
-FRESHRSS_VERSION=`grep "'FRESHRSS_VERSION'" constants.php | cut -d "'" -f4`
+FRESHRSS_VERSION=$(grep "'FRESHRSS_VERSION'" constants.php | cut -d "'" -f4)
echo "$FRESHRSS_VERSION"
-if [[ "$DOCKERFILE_PATH" == *-ARM ]]
-then
+if [[ $DOCKERFILE_PATH == *-ARM ]]; then
#TODO: Add --squash --platform arm options when Docker Hub deamon supports them
docker build \
--build-arg FRESHRSS_VERSION="$FRESHRSS_VERSION" \
diff --git a/Docker/hooks/pre_build b/Docker/hooks/pre_build
index 5946b045b..b2cda0e48 100755
--- a/Docker/hooks/pre_build
+++ b/Docker/hooks/pre_build
@@ -1,7 +1,6 @@
#!/bin/bash
-if [[ "$DOCKERFILE_PATH" == *-ARM ]]
-then
+if [[ $DOCKERFILE_PATH == *-ARM ]]; then
# https://github.com/balena-io/qemu
# Download a local copy of QEMU on Docker Hub build machine
curl -LSs 'https://github.com/balena-io/qemu/releases/download/v3.0.0%2Bresin/qemu-3.0.0+resin-arm.tar.gz' | tar -xzv --strip-components=1 --wildcards '*/qemu-*'