aboutsummaryrefslogtreecommitdiff
path: root/tools/docker
diff options
context:
space:
mode:
authorStephen Finucane <stephen@that.guru>2018-08-29 11:10:20 +0100
committerStephen Finucane <stephen@that.guru>2018-08-30 09:38:46 +0100
commitd95129494ff81520181e04d02f6cfa3577baeb59 (patch)
tree62bdd38332c8016b89a3a9d844c0dda25d8b6593 /tools/docker
parentf9772a0a36d17aa71f660f49eee65554965eeafb (diff)
downloadpatchwork-d95129494ff81520181e04d02f6cfa3577baeb59.tar
patchwork-d95129494ff81520181e04d02f6cfa3577baeb59.tar.gz
docker: Use heredocs where possible
This was suggested in a recent review [1]. Make it happen. [1] http://patchwork.ozlabs.org/patch/933979/#1941584 Signed-off-by: Stephen Finucane <stephen@that.guru> Suggested-by: Petr Vorel <petr.vorel@gmail.com> Reviewed-by: Petr Vorel <pvorel@suse.cz>
Diffstat (limited to 'tools/docker')
-rwxr-xr-xtools/docker/entrypoint.sh23
1 files changed, 14 insertions, 9 deletions
diff --git a/tools/docker/entrypoint.sh b/tools/docker/entrypoint.sh
index afa8533..32f7132 100755
--- a/tools/docker/entrypoint.sh
+++ b/tools/docker/entrypoint.sh
@@ -57,21 +57,26 @@ reset_data() {
# check if patchwork is mounted. Checking if we exist is a
# very good start!
if [ ! -f ~patchwork/patchwork/tools/docker/entrypoint.sh ]; then
- echo "The patchwork directory doesn't seem to be mounted!"
- echo "Are you using docker-compose?"
- echo "If so, you may need to create an SELinux rule. Refer to the"
- echo "development installation documentation for more information."
- echo "If not, you need -v PATH_TO_PATCHWORK:/home/patchwork/patchwork"
+ cat << EOF
+The patchwork directory doesn't seem to be mounted!
+
+Are you using docker-compose? If so, you may need to create an SELinux rule.
+Refer to the development installation documentation for more information.
+If not, you need -v PATH_TO_PATCHWORK:/home/patchwork/patchwork
+EOF
exit 1
fi
# check if we need to rebuild because requirements changed
for x in /tmp/requirements-*.txt; do
if ! cmp $x ~/patchwork/$(basename $x); then
- echo "A requirements file has changed."
- echo "You may need to rebuild the patchwork image:"
- echo " docker-compose build web"
- echo ""
+ cat << EOF
+A requirements file has changed.
+
+You may need to rebuild the patchwork image:
+
+ docker-compose build web
+EOF
diff -u $x ~/patchwork/$(basename $x)
fi
done