prompt.sh 480 B

123456789101112131415161718
  1. #!/bin/bash
  2. DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
  3. if ! $DIR/check-reqs.sh >&2; then
  4. echo "A toolchain is not available and the above issues were found." >&2
  5. echo "Resolve the problems above and run \`make\` again." >&2
  6. echo -n "n" && exit 1
  7. fi
  8. echo -n "Toolchain has not been built. Would you like to build it now? (y/n) " >&2
  9. read response
  10. case $response in
  11. [yY]) bash $DIR/build-gcc.sh >&2 ;;
  12. [nN]) echo -n "n" && exit 1 ;;
  13. *)
  14. esac