Skip to content

Commit

Permalink
get_fstar_z3.sh: fix arg check
Browse files Browse the repository at this point in the history
  • Loading branch information
mtzguido committed Jan 8, 2025
1 parent 628065a commit 4501f10
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions .scripts/get_fstar_z3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,12 @@ full_install_z3() {
popd
}

if [ "$1" == "--full" ]; then
usage() {
echo "Usage: get_fstar_z3.sh destination/directory/bin"
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
Expand All @@ -100,12 +105,12 @@ if [ "$1" == "--full" ]; then
shift;
fi

dest_dir="$1"
if [ -z "$dest_dir" ]; then
echo "Usage: get_fstar_z3.sh destination/directory/bin"
exit 1
if [ $# -ne 1 ]; then
usage
fi

dest_dir="$1"

mkdir -p "$dest_dir"

for z3_ver in 4.8.5 4.13.3; do
Expand Down

0 comments on commit 4501f10

Please sign in to comment.