You are here

preflight.sh in Realistic Dummy Content 8

echo -e "[  >>] Start of script $0 (from $(pwd))"
# Make sure errors propagate throughout the script
set -e

if [ "$(dirname $0)" != "./dcycle/lib" ];then
  echo -e "[error] The folder dcycle and its contents must be at the root of your"
  echo -e "        project, and must be called from the root of your project. That"
  echo -e "        is, for example, you must call ./dcycle/deploy.sh so that the location"
  echo -e "        (parent directory) of preflight.sh is ./dcycle/lib; it is currently"
  echo -e "        $(dirname $0)."
  exit 1;
fi

if [ ! -f ./Dcycle-Dockerfile-drupal8module ];then
  echo -e "[error] Dcycle-Dockerfile-drupal8module must exist. Please make sure that you correctly"
  echo -e "        installed "
  echo -e "        the dcycle scripts on your project, by copying the dcycle folder, and"
  echo -e "        Dockerfile, etc. to your project root."
  exit 1;
fi

echo -e "[<<  ] End of script $0"

File

dcycle/lib/preflight.sh
View source
  1. echo -e "[ >>] Start of script $0 (from $(pwd))"
  2. # Make sure errors propagate throughout the script
  3. set -e
  4. if [ "$(dirname $0)" != "./dcycle/lib" ];then
  5. echo -e "[error] The folder dcycle and its contents must be at the root of your"
  6. echo -e " project, and must be called from the root of your project. That"
  7. echo -e " is, for example, you must call ./dcycle/deploy.sh so that the location"
  8. echo -e " (parent directory) of preflight.sh is ./dcycle/lib; it is currently"
  9. echo -e " $(dirname $0)."
  10. exit 1;
  11. fi
  12. if [ ! -f ./Dcycle-Dockerfile-drupal8module ];then
  13. echo -e "[error] Dcycle-Dockerfile-drupal8module must exist. Please make sure that you correctly"
  14. echo -e " installed "
  15. echo -e " the dcycle scripts on your project, by copying the dcycle folder, and"
  16. echo -e " Dockerfile, etc. to your project root."
  17. exit 1;
  18. fi
  19. echo -e "[<< ] End of script $0"