install_sample.sh 711 B

12345678910111213141516171819202122232425262728293031
  1. #!/bin/sh
  2. ZEPHYR_DIR=
  3. if [ $# -ne 1 ]; then
  4. echo "Need location of zephyr project as a command line argument"
  5. exit 1
  6. else
  7. ZEPHYR_DIR=$1
  8. fi
  9. if [ ! -d $ZEPHR_DIR ]; then
  10. echo "Zephyr project directory does not exist: $ZEPHYR_DIR"
  11. exit 1
  12. fi
  13. ZEPHYR_SAMPLES_DIR=$ZEPHYR_DIR/zephyr/samples/modules
  14. if [ ! -d $ZEPHYR_SAMPLES_DIR ]; then
  15. echo "Zephyr samples/module directory does not exist: $ZEPHYR_SAMPLES_DIR"
  16. exit 1
  17. fi
  18. ZEPHYR_WOLFSSL_DIR=$ZEPHYR_SAMPLES_DIR/wolfssl_tls_sock
  19. echo "wolfSSL directory:"
  20. echo " $ZEPHYR_WOLFSSL_DIR"
  21. rm -rf $ZEPHYR_WOLFSSL_DIR
  22. mkdir $ZEPHYR_WOLFSSL_DIR
  23. echo "Copy in Sample files ..."
  24. cp -r * $ZEPHYR_WOLFSSL_DIR/
  25. rm $ZEPHYR_WOLFSSL_DIR/$0
  26. echo "Done"