-
Notifications
You must be signed in to change notification settings - Fork 259
[ new ] install script for the standard library #2895
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
|
||
| # Double check that the command exists | ||
| if ! [ -x "$(command -v $AGDA_EXEC)" ]; then | ||
| throwError "'$AGDA_EXEC' is not a valid executable" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we check if e.g. $HOME/.cabal/bin/$AGDA_EXEC exists and suggest that the user should be adding $HOME/.cabal/bin/ to their PATH?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can get cabal's default install path from cabal with cabal path --installdir
|
In theory this looks great. How cross platform is this and what do we need to do to support a new release? It looks like we just update the lookup table? |
|
It won't work on windows but I'm keeping it as simple as possible in the hope it'd work on And, indeed, the only update would be to the lookup table. |
| # Downloading and extracting the standard library | ||
| STDLIB_TARBALL_NAME="/tmp/agda-stdlib-$STDLIB_VERSION.tar.gz" | ||
| STDLIB_TARBALL_URL="https://github.com/agda/agda-stdlib/archive/$STDLIB_TAG.tar.gz" | ||
| wget -O "$STDLIB_TARBALL_NAME" "$STDLIB_TARBALL_URL" -o logs/wget |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Catch errors and report them?
62a2c03 to
493080f
Compare
Keep asking the user until we get a valid Agda executable
3037ebf to
eba7fa7
Compare
a903fd3 to
7c4e75f
Compare
|
I am quite happy with the current script. I have included a command you can copy/paste in a terminal to test it. |
curl-based command for users to runFor testing purposes, using the latest version of the script on my branch: