Last active
December 7, 2023 08:24
-
-
Save bzm3r/fe9beeb3e9b82b555defed8a02a35bf3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -x | |
ENV_SNAPSHOT=$(realpath -- "$(dirname -- "${BASH_SOURCE[0]}")/recorded_env") | |
source "$ENV_SNAPSHOT" | |
# make a .cargo directory (if it doesn't already exist) | |
echo "Creating CARGO_HOME at /home/bzm3r/.cargo_rust-shell" | |
# TODO: Should do folder creation elegantly/robustly later (check to see | |
# if it exists, rather than just blindly creating it). | |
CARGO_HOME="$(realpath /home/bzm3r/.cargo_rust-shell)" | |
export CARGO_HOME | |
mkdir "$CARGO_HOME" | |
# overwrite any existing config.toml with one from home. | |
# TODO: in the future, perform a merge with an existing file? | |
cp --remove-destination /home/bzm3r/.cargo_rust-shell /home/bzm3r/.cargo_rust-shell/config.toml | |
# create .<name>_sccache cargoConfigDir (if it doesn't already exist) | |
echo "Creating SCCACHE_DIR at /home/bzm3r/.sccache_rust-shell" | |
SCCACHE_DIR="$(realpath /home/bzm3r/.sccache_rust-shell)" | |
mkdir "$SCCACHE_DIR" | |
export SCCACHE_DIR | |
# name of the workspace for purposes such as | |
export DEFAULT_WORKSPACE=rust-shell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment