| 1 | #!/bin/bash |
| 2 | # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"). |
| 5 | # You may not use this file except in compliance with the License. |
| 6 | # A copy of the License is located at |
| 7 | # |
| 8 | # http://aws.amazon.com/apache2.0 |
| 9 | # |
| 10 | # or in the "license" file accompanying this file. This file is distributed |
| 11 | # on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either |
| 12 | # express or implied. See the License for the specific language governing |
| 13 | # permissions and limitations under the License. |
| 14 | # |
| 15 | |
| 16 | set -e |
| 17 | |
| 18 | usage() { |
| 19 | echo "install_z3_yices.sh download_dir install_dir" |
| 20 | exit 1 |
| 21 | } |
| 22 | |
| 23 | if [ "$#" -ne "2" ]; then |
| 24 | usage |
| 25 | fi |
| 26 | |
| 27 | DOWNLOAD_DIR=$1 |
| 28 | INSTALL_DIR=$2 |
| 29 | |
| 30 | mkdir -p "$DOWNLOAD_DIR" |
| 31 | cd "$DOWNLOAD_DIR" |
| 32 | |
| 33 | #download z3 and yices |
| 34 | curl --retry 3 https://s3-us-west-2.amazonaws.com/s2n-public-test-dependencies/yices-2.6.1-x86_64-pc-linux-gnu-static-gmp.tar.gz --output yices.tar.gz |
| 35 | tar -xf yices.tar.gz |
| 36 | |
| 37 | curl --retry 3 https://s3-us-west-2.amazonaws.com/s2n-public-test-dependencies/z3-4.8.8-x64-ubuntu-16.04.zip --output z3.zip |
| 38 | unzip z3.zip |
| 39 | |
| 40 | mkdir -p "$INSTALL_DIR"/bin |
| 41 | mv z3-4.8.8-x64-ubuntu-16.04/bin/* "$INSTALL_DIR"/bin |
| 42 | mv yices-2.6.1/bin/* "$INSTALL_DIR"/bin |
| 43 | chmod +x "$INSTALL_DIR"/bin/* |
| 44 | |
| 45 | "$INSTALL_DIR"/bin/yices-smt2 --version |
| 46 | "$INSTALL_DIR"/bin/yices --version |
| 47 | "$INSTALL_DIR"/bin/z3 --version |