You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
1.2 KiB

3 months ago
  1. #!/bin/bash
  2. # Get arguments
  3. if [ $# -ne 1 ]; then
  4. # Print usage
  5. echo "Download helper for the 'Quantitative Verification Benchmark Set' (QVBS) from http://qcomp.org/benchmarks/"
  6. FILE_NAME=$(basename $BASH_SOURCE)
  7. echo "- Usage:"
  8. echo -e "\t./$FILE_NAME <destination directory>"
  9. exit 1
  10. fi
  11. DIR=$1
  12. # Check if directory already exists
  13. if [ -d "$DIR" ]; then
  14. # Check if directory already contains git repo
  15. git -C $DIR rev-parse
  16. GIT_RET=$?
  17. if [ $GIT_RET -ne 0 ]; then
  18. echo "- Directory already exists."
  19. exit 2
  20. fi
  21. # Directory contains git repo
  22. GIT_URL=$(git -C $DIR config --get remote.origin.url)
  23. if [ "$GIT_URL" = "https://github.com/ahartmanns/qcomp.git" ]; then
  24. echo "- QVBS repo already exists. Updating the repo instead."
  25. git -C $DIR pull
  26. else
  27. echo "- Unknown git repo already exists in directory."
  28. exit 3
  29. fi
  30. else
  31. echo "- Will clone repo from https://github.com/ahartmanns/qcomp.git"
  32. git clone https://github.com/ahartmanns/qcomp.git $DIR
  33. echo "- QVBS successfully downloaded to $DIR"
  34. fi
  35. echo "- Integrate QVBS into Storm by adding the following flag to CMake:"
  36. echo "-DSTORM_QVBS_ROOT=$DIR/benchmarks"