Dockerfile: use WORKDIR to simplify steps

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit d386c4cd2c)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2019-03-06 15:02:29 +01:00
parent 1c19c46ed9
commit ccfbc28549

View File

@@ -29,24 +29,10 @@ while getopts ":hl" opt; do
done
# Do some sanity-checking to make sure we are running this from the right place
if [ $LOCAL -eq 1 ]; then
SOURCE="."
if ! [ -f _config.yml ]; then
echo "Could not find _config.yml. We may not be in the right place. Bailing."
exit 1
fi
else
SOURCE="md_source"
if ! [ -d md_source ]; then
echo "Could not find md_source directory. We may not be running in the right place. Bailing."
exit 1
fi
fi
# Reasonable default to find the Markdown files
if [ -z "$SOURCE" ]; then
echo "No source passed in, assuming md_source/..."
SOURCE="md_source"
SOURCE="."
if ! [ -f _config.yml ]; then
echo "Could not find _config.yml. We may not be in the right place. Bailing."
exit 1
fi
echo "Operating on contents of $SOURCE"