diff options
author | Josh Spicer <joshspicer@github.com> | 2022-07-29 18:38:08 +0300 |
---|---|---|
committer | Josh Spicer <joshspicer@github.com> | 2022-07-29 18:38:08 +0300 |
commit | 86eaacb47edefaa8fa36d37eff8b5cccf9d838f4 (patch) | |
tree | 14cce439014020be97ca6a80fb88bbd906b26346 /src | |
parent | 6191a2e5d5018fbf018ce9b3d9c03b9821d5e26e (diff) |
Port changes and set executable bit
-Ports change from: https://github.com/microsoft/vscode-dev-containers/pull/1554
Sets all scripts as executable by default.
Diffstat (limited to 'src')
-rwxr-xr-x[-rw-r--r--] | src/anaconda/install.sh | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | src/azure-cli/install.sh | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | src/common/install.sh | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | src/desktop-lite/install.sh | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | src/docker-from-docker/install.sh | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | src/docker-in-docker/install.sh | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | src/dotnet/install.sh | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | src/git-lfs/install.sh | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | src/git/install.sh | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | src/github-cli/install.sh | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | src/go/install.sh | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | src/hugo/install.sh | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | src/java/install.sh | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | src/kubectl-helm-minikube/install.sh | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | src/node/install.sh | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | src/php/install.sh | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | src/powershell/install.sh | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | src/ruby/install.sh | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | src/rust/install.sh | 28 | ||||
-rwxr-xr-x[-rw-r--r--] | src/sshd/install.sh | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | src/terraform/install.sh | 0 |
21 files changed, 27 insertions, 1 deletions
diff --git a/src/anaconda/install.sh b/src/anaconda/install.sh index 750077e..750077e 100644..100755 --- a/src/anaconda/install.sh +++ b/src/anaconda/install.sh diff --git a/src/azure-cli/install.sh b/src/azure-cli/install.sh index d5a586f..d5a586f 100644..100755 --- a/src/azure-cli/install.sh +++ b/src/azure-cli/install.sh diff --git a/src/common/install.sh b/src/common/install.sh index 7edbe53..7edbe53 100644..100755 --- a/src/common/install.sh +++ b/src/common/install.sh diff --git a/src/desktop-lite/install.sh b/src/desktop-lite/install.sh index e9f74f1..e9f74f1 100644..100755 --- a/src/desktop-lite/install.sh +++ b/src/desktop-lite/install.sh diff --git a/src/docker-from-docker/install.sh b/src/docker-from-docker/install.sh index 88ad52f..88ad52f 100644..100755 --- a/src/docker-from-docker/install.sh +++ b/src/docker-from-docker/install.sh diff --git a/src/docker-in-docker/install.sh b/src/docker-in-docker/install.sh index 02dd260..02dd260 100644..100755 --- a/src/docker-in-docker/install.sh +++ b/src/docker-in-docker/install.sh diff --git a/src/dotnet/install.sh b/src/dotnet/install.sh index 3e4bfec..3e4bfec 100644..100755 --- a/src/dotnet/install.sh +++ b/src/dotnet/install.sh diff --git a/src/git-lfs/install.sh b/src/git-lfs/install.sh index e5934fa..e5934fa 100644..100755 --- a/src/git-lfs/install.sh +++ b/src/git-lfs/install.sh diff --git a/src/git/install.sh b/src/git/install.sh index 1da6500..1da6500 100644..100755 --- a/src/git/install.sh +++ b/src/git/install.sh diff --git a/src/github-cli/install.sh b/src/github-cli/install.sh index 4fea41b..4fea41b 100644..100755 --- a/src/github-cli/install.sh +++ b/src/github-cli/install.sh diff --git a/src/go/install.sh b/src/go/install.sh index e524e26..e524e26 100644..100755 --- a/src/go/install.sh +++ b/src/go/install.sh diff --git a/src/hugo/install.sh b/src/hugo/install.sh index f7ab7a2..f7ab7a2 100644..100755 --- a/src/hugo/install.sh +++ b/src/hugo/install.sh diff --git a/src/java/install.sh b/src/java/install.sh index 411fffb..411fffb 100644..100755 --- a/src/java/install.sh +++ b/src/java/install.sh diff --git a/src/kubectl-helm-minikube/install.sh b/src/kubectl-helm-minikube/install.sh index b10f578..b10f578 100644..100755 --- a/src/kubectl-helm-minikube/install.sh +++ b/src/kubectl-helm-minikube/install.sh diff --git a/src/node/install.sh b/src/node/install.sh index 7169919..7169919 100644..100755 --- a/src/node/install.sh +++ b/src/node/install.sh diff --git a/src/php/install.sh b/src/php/install.sh index 7380114..7380114 100644..100755 --- a/src/php/install.sh +++ b/src/php/install.sh diff --git a/src/powershell/install.sh b/src/powershell/install.sh index be60201..be60201 100644..100755 --- a/src/powershell/install.sh +++ b/src/powershell/install.sh diff --git a/src/ruby/install.sh b/src/ruby/install.sh index 4920287..4920287 100644..100755 --- a/src/ruby/install.sh +++ b/src/ruby/install.sh diff --git a/src/rust/install.sh b/src/rust/install.sh index be52fd3..3970bb2 100644..100755 --- a/src/rust/install.sh +++ b/src/rust/install.sh @@ -94,6 +94,25 @@ find_version_from_git_tags() { echo "${variable_name}=${!variable_name}" } +check_nightly_version_formatting() { + local variable_name=$1 + local requested_version=${!variable_name} + if [ "${requested_version}" = "none" ]; then return; fi + + local version_date=$(echo ${requested_version} | sed -e "s/^nightly-//") + + date -d ${version_date} &>/dev/null + if [ $? != 0 ]; then + echo -e "Invalid ${variable_name} value: ${requested_version}\nNightly version should be in the format nightly-YYYY-MM-DD" >&2 + exit 1 + fi + + if [ $(date -d ${version_date} +%s) -ge $(date +%s) ]; then + echo -e "Invalid ${variable_name} value: ${requested_version}\nNightly version should not exceed current date" >&2 + exit 1 + fi +} + updaterc() { if [ "${UPDATE_RC}" = "true" ]; then echo "Updating /etc/bash.bashrc and /etc/zsh/zshrc..." @@ -159,7 +178,14 @@ else apt_get_update_if_needed apt-get -y install --no-install-recommends git fi - find_version_from_git_tags RUST_VERSION "https://github.com/rust-lang/rust" "tags/" + + echo ${RUST_VERSION} | grep -q "nightly" + is_nightly=$? + if [ $is_nightly = 0 ]; then + check_nightly_version_formatting RUST_VERSION + else + find_version_from_git_tags RUST_VERSION "https://github.com/rust-lang/rust" "tags/" + fi default_toolchain_arg="--default-toolchain ${RUST_VERSION}" fi echo "Installing Rust..." diff --git a/src/sshd/install.sh b/src/sshd/install.sh index 4ee7893..4ee7893 100644..100755 --- a/src/sshd/install.sh +++ b/src/sshd/install.sh diff --git a/src/terraform/install.sh b/src/terraform/install.sh index 3368374..3368374 100644..100755 --- a/src/terraform/install.sh +++ b/src/terraform/install.sh |