You are here

kill.sh in Realistic Dummy Content 7.2

Same filename and directory in other branches
  1. 8.2 developer/kill.sh
#!/bin/bash
#
# Kill the development environment if it exists.
#

set -e

BASEPATH="$(pwd)"
SCRIPTNAME="$(basename "$0")"

if [ ! -f "$BASEPATH"/"$SCRIPTNAME" ]; then
  echo -e '[error] Please run this script from the developer directory of'
  echo -e '        realistic_dummy_content, like this:'
  echo -e ''
  echo -e '            cd /path/to/realistic_dummy_content/developer'
  echo -e "            ./$SCRIPTNAME"
  echo -e ''
  exit 1;
fi

if [ -d "$BASEPATH"/tmp ]; then
  chmod -R +w ./tmp
  rm -rf ./tmp
fi

./docker-compose-in-docker.sh kill

File

developer/kill.sh
View source
  1. #!/bin/bash
  2. #
  3. # Kill the development environment if it exists.
  4. #
  5. set -e
  6. BASEPATH="$(pwd)"
  7. SCRIPTNAME="$(basename "$0")"
  8. if [ ! -f "$BASEPATH"/"$SCRIPTNAME" ]; then
  9. echo -e '[error] Please run this script from the developer directory of'
  10. echo -e ' realistic_dummy_content, like this:'
  11. echo -e ''
  12. echo -e ' cd /path/to/realistic_dummy_content/developer'
  13. echo -e " ./$SCRIPTNAME"
  14. echo -e ''
  15. exit 1;
  16. fi
  17. if [ -d "$BASEPATH"/tmp ]; then
  18. chmod -R +w ./tmp
  19. rm -rf ./tmp
  20. fi
  21. ./docker-compose-in-docker.sh kill