|
4 | 4 | set -eu
|
5 | 5 |
|
6 | 6 | ASDF_INSTALL_DOCS="https://asdf-vm.com/guide/getting-started.html"
|
7 |
| -SCARB_UNINSTALL_DOCS="https://docs.swmansion.com/scarb/download#uninstall" |
8 |
| -STARKNET_FOUNDRY_UNINSTALL_DOCS="PENDING" |
| 7 | +SCARB_UNINSTALL_INSTRUCTIONS="For uninstallation instructions, refer to https://docs.swmansion.com/scarb/download#uninstall" |
| 8 | +# TODO(#2): Link snfoundry uninstall docs once they are available |
| 9 | +STARKNET_FOUNDRY_UNINSTALL_INSTRUCTIONS="Consider removing snforge and sncast binaries from $HOME/.local/bin" |
9 | 10 | SCRIPT_VERSION="0.1.0"
|
10 | 11 | DEFAULT_ASDF_VERSION="v0.14.1"
|
11 | 12 |
|
@@ -40,12 +41,12 @@ main() {
|
40 | 41 | done
|
41 | 42 |
|
42 | 43 | assert_dependencies
|
43 |
| - assert_not_installed "scarb" $SCARB_UNINSTALL_DOCS |
| 44 | + assert_not_installed "scarb" "$SCARB_UNINSTALL_INSTRUCTIONS" |
44 | 45 | install_latest_asdf_plugin "scarb"
|
45 | 46 | install_latest_version "scarb"
|
46 | 47 | set_global_latest_version "scarb"
|
47 | 48 |
|
48 |
| - assert_not_installed "starknet-foundry" $STARKNET_FOUNDRY_UNINSTALL_DOCS |
| 49 | + assert_not_installed "starknet-foundry" "$STARKNET_FOUNDRY_UNINSTALL_INSTRUCTIONS" |
49 | 50 | install_latest_asdf_plugin "starknet-foundry"
|
50 | 51 |
|
51 | 52 | # Reinstall to ensure the latest version of USC is installed
|
@@ -90,11 +91,11 @@ assert_dependencies() {
|
90 | 91 |
|
91 | 92 | assert_not_installed() {
|
92 | 93 | local tool="$1"
|
93 |
| - local uninstall_docs_url="$2" |
| 94 | + local uninstall_instructions="$2" |
94 | 95 |
|
95 | 96 | if ! asdf which "$tool" >/dev/null 2>&1; then
|
96 | 97 | if check_cmd "$tool"; then
|
97 |
| - err "$tool is already installed outside of asdf. Please uninstall it and re-run this script. For uninstallation instructions, refer to $uninstall_docs_url." |
| 98 | + err "$tool is already installed outside of asdf. Please uninstall it and re-run this script. $uninstall_instructions" |
98 | 99 | fi
|
99 | 100 | fi
|
100 | 101 | }
|
|
0 commit comments