microsoft/AI-For-Beginners

Public

mirrored fromhttps://github.com/microsoft/AI-For-BeginnersAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
57c2faebcf0fb7dc37cca0202f0e29118ddfa71c

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

.devcontainer/add-notice.sh

19lines · modecode

1# Display a notice when not running in GitHub Codespaces
2
3cat << 'EOF' > /usr/local/etc/vscode-dev-containers/conda-notice.txt
4When using "conda" from outside of GitHub Codespaces, note the Anaconda repository
5contains restrictions on commercial use that may impact certain organizations. See
6https://aka.ms/vscode-remote/conda/miniconda
7
8EOF
9
10notice_script="$(cat << 'EOF'
11if [ -t 1 ] && [ "${IGNORE_NOTICE}" != "true" ] && [ "${TERM_PROGRAM}" = "vscode" ] && [ "${CODESPACES}" != "true" ] && [ ! -f "$HOME/.config/vscode-dev-containers/conda-notice-already-displayed" ]; then
12 cat "/usr/local/etc/vscode-dev-containers/conda-notice.txt"
13 mkdir -p "$HOME/.config/vscode-dev-containers"
14 ((sleep 10s; touch "$HOME/.config/vscode-dev-containers/conda-notice-already-displayed") &)
15fi
16EOF
17)"
18
19echo "${notice_script}" | tee -a /etc/bash.bashrc >> /etc/zsh/zshrc