From 195da69e9583871ecb10c449095985a9613e3eef Mon Sep 17 00:00:00 2001 From: slhmy Date: Wed, 17 Jan 2024 16:12:35 +0800 Subject: [PATCH] Update devcontainer.json --- .devcontainer/devcontainer.json | 4 ++-- .gitignore | 3 ++- ENV_SETUP.bash => scripts/env_setup.bash | 4 +++- 3 files changed, 7 insertions(+), 4 deletions(-) rename ENV_SETUP.bash => scripts/env_setup.bash (64%) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 7440760..5a964e7 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,4 +1,4 @@ { "image": "mcr.microsoft.com/devcontainers/universal:2", - "onCreateCommand": "${containerWorkspaceFolder}/ENV_SETUP.bash" -} \ No newline at end of file + "postCreateCommand": "${containerWorkspaceFolder}/scripts/env_setup.bash" +} diff --git a/.gitignore b/.gitignore index 3d3ef21..d4d3ffe 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ target/ tmp/ !tmp/.gitkeep -Cargo.lock \ No newline at end of file +Cargo.lock +scripts/rustup.sh \ No newline at end of file diff --git a/ENV_SETUP.bash b/scripts/env_setup.bash similarity index 64% rename from ENV_SETUP.bash rename to scripts/env_setup.bash index 6d242e9..0c739e6 100755 --- a/ENV_SETUP.bash +++ b/scripts/env_setup.bash @@ -10,4 +10,6 @@ if [[ $CUR_SYSTEM =~ $UBUNTU_FLAG ]];then sudo apt install -y libseccomp-dev gcc fi -curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh \ No newline at end of file +curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs >> scripts/rustup.sh +chmod +x scripts/rustup.sh +./scripts/rustup.sh -y \ No newline at end of file