-
Notifications
You must be signed in to change notification settings - Fork 260
[ 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
| if ! grep -Eq "^standard-library$" "defaults-$AGDA_VERSION"; then | ||
| echo "standard-library" >> "defaults-$AGDA_VERSION" |
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 specify the version number?
|
|
||
| # 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.
curl-based command for users to run