Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 41 additions & 13 deletions .scripts/get_fstar_z3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,26 +96,54 @@ full_install_z3() {
}

usage() {
echo "Usage: get_fstar_z3.sh destination/directory/bin"
echo "Usage: get_fstar_z3.sh destination/directory/bin [--full] [--arch <x86_64|aarch64>] [--kernel <Linux|Darwin|Windows>]"
exit 1
}

if [ $# -ge 1 ] && [ "$1" == "--full" ]; then
# Passing --full xyz/ will create a tree like
# xyz/z3-4.8.5/bin/z3
# xyz/z3-4.13.3/bin/z3
# (plus all other files in each package). This is used
# for our binary packages which include Z3.
full_install=true;
shift;
fi
dest_dir_set=false
while [ $# -ge 1 ]; do
case "$1" in
--arch)
shift
if [ $# -lt 1 ]; then usage; fi
arch="$1"
;;
--kernel)
shift
if [ $# -lt 1 ]; then usage; fi
kernel="$1"
;;
--full)
# Passing --full xyz/ will create a tree like
# xyz/z3-4.8.5/bin/z3
# xyz/z3-4.13.3/bin/z3
# (plus all other files in each package). This is used
# for our binary packages which include Z3.
full_install=true;
;;
--*)
usage
;;
--)
if $dest_dir_set; then usage; fi
shift
if [ $# -lt 1 ]; then usage; fi
dest_dir="$1"
dest_dir_set=true
;;
*)
if $dest_dir_set; then usage; fi
dest_dir="$1"
dest_dir_set=true
;;
esac
shift
done

if [ $# -ne 1 ]; then
if [ "$dest_dir_set" == "false" ]; then
usage
fi

dest_dir="$1"

mkdir -p "$dest_dir"

for z3_ver in 4.8.5 4.13.3 4.15.3; do
Expand Down
Loading