Skip to content

Commit

Permalink
Minor fixes and QoL improvements (#360)
Browse files Browse the repository at this point in the history
1. Bring `set-up-rust.sh` into sync with the README by making it executable (the README [expects it to be executable](https://github.com/verus-lang/verus#step-1-build-rust))
2. Correctly account for symlinks
    1. if the `rust/` directory is being pulled in as a symlink---useful if you're holding on to multiple copies of verus during development, where you want to share the main rust installation
    2. if the main verus repo itself is inside a symlinked folder
  • Loading branch information
jaybosamiya authored Feb 7, 2023
1 parent 82dba3a commit d10870b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
/rust/
/rust
*.swp
3 changes: 2 additions & 1 deletion tools/set-up-rust.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#! /bin/bash

toplevel=`git rev-parse --show-toplevel`
curdir=`readlink -f "$PWD"`

if [ "$toplevel" != "$PWD" ]; then
if [ "$toplevel" != "$curdir" ]; then
echo "ERROR: You should run this script at the root of the verus repository"
exit 1
fi
Expand Down
3 changes: 2 additions & 1 deletion tools/update-rust.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#! /bin/bash

toplevel=`git rev-parse --show-toplevel`
curdir=`readlink -f "$PWD"`
python_command=''

command -v python > /dev/null
Expand All @@ -10,7 +11,7 @@ if [ ! $has_python -eq 0 ]; then
python_command='python3'
fi

if [ "$toplevel" != "$PWD" ]; then
if [ "$toplevel" != "$curdir" ]; then
echo "ERROR: You should run this script at the root of the verus repository"
exit 1
fi
Expand Down

0 comments on commit d10870b

Please sign in to comment.