From ccfbc285495fd924e6a7cf5a7b91f1bbca899348 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Wed, 6 Mar 2019 15:02:29 +0100 Subject: [PATCH] Dockerfile: use WORKDIR to simplify steps Signed-off-by: Sebastiaan van Stijn (cherry picked from commit d386c4cd2ce7542ef1c3cfba62393076a580fa7b) Signed-off-by: Sebastiaan van Stijn --- _scripts/fetch-upstream-resources.sh | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/_scripts/fetch-upstream-resources.sh b/_scripts/fetch-upstream-resources.sh index e3c5f532a8..0f8f542811 100755 --- a/_scripts/fetch-upstream-resources.sh +++ b/_scripts/fetch-upstream-resources.sh @@ -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"