Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .assets/provision/distro_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ declare -A state=(
["uid"]="$(id -u)"
["def_uid"]="$([ -f /etc/wsl-distribution.conf ] && grep 'defaultUid' /etc/wsl-distribution.conf | sed -E 's/defaultUid *= *([0-9]+)/\1/' || id -u)"
["az"]=$([ -x "$HOME/.local/bin/az" ] && echo true || echo false)
["bun"]=$([ -x "$HOME/.bun/bin/bun" ] && echo true || echo false)
["conda"]=$([ -d "$HOME/miniforge3" ] && echo true || echo false)
["gcloud"]=$([ -x '/usr/bin/gcloud' ] && echo true || echo false)
["git_user"]=$([ -n "$(git config --global --get user.name 2>/dev/null)" ] && echo true || echo false)
Expand Down
8 changes: 6 additions & 2 deletions .assets/scripts/linux_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# :set up the system using specified values
scope="pwsh"
scope="k8s_base pwsh python"
scope="az docker k8s_base pwsh terraform nodejs"
scope="az docker k8s_base pwsh terraform bun"
scope="az distrobox k8s_ext rice pwsh"
# :set up the system using the specified scope
.assets/scripts/linux_setup.sh --scope "$scope"
Expand Down Expand Up @@ -74,6 +74,7 @@ order=(
conda
az
gcloud
bun
nodejs
terraform
oh_my_posh
Expand Down Expand Up @@ -140,6 +141,10 @@ for sc in "${scope_arr[@]}"; do
.assets/provision/install_azurecli_uv.sh --fix_certify true
sudo .assets/provision/install_azcopy.sh >/dev/null
;;
bun)
printf "\e[96minstalling bun...\e[0m\n"
.assets/provision/install_bun.sh
;;
conda)
printf "\e[96minstalling python packages...\e[0m\n"
.assets/provision/install_miniforge.sh --fix_certify true
Expand Down Expand Up @@ -184,7 +189,6 @@ for sc in "${scope_arr[@]}"; do
nodejs)
printf "\e[96minstalling Node.js...\e[0m\n"
sudo .assets/provision/install_nodejs.sh
.assets/provision/install_bun.sh
;;
oh_my_posh)
printf "\e[96minstalling oh-my-posh...\e[0m\n"
Expand Down
3 changes: 2 additions & 1 deletion wsl/wsl_install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,15 @@ Name of the WSL distro to install and set up.
.PARAMETER Scope
List of installation scopes. Valid values:
- az: azure-cli, azcopy, Az PowerShell module if pwsh scope specified; autoselects python scope
- bun: Bun - all-in-one JavaScript, TypeScript & JSX toolkit using JavaScriptCore engine
- conda: miniforge
- distrobox: (WSL2 only) - podman and distrobox
- docker: (WSL2 only) - docker, containerd buildx docker-compose
- gcloud: google-cloud-cli
- k8s_base: kubectl, kubelogin, k9s, kubecolor, kubectx, kubens
- k8s_dev: argorollouts, cilium, helm, flux, kustomize cli tools; autoselects k8s_base scope
- k8s_ext: (WSL2 only) - minikube, k3d, kind local kubernetes tools; autoselects docker, k8s_base and k8s_dev scopes
- nodejs: Node.js JavaScript runtime environment, bun, npm
- nodejs: Node.js JavaScript runtime environment using V8 engine
- pwsh: PowerShell Core and corresponding PS modules; autoselects shell scope
- python: uv, prek, pip, venv
- rice: btop, cmatrix, cowsay, fastfetch
Expand Down
31 changes: 19 additions & 12 deletions wsl/wsl_setup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@ Name of the WSL distro to set up. If not specified, script will update all exist
.PARAMETER Scope
List of installation scopes. Valid values:
- az: azure-cli, azcopy, Az PowerShell module if pwsh scope specified; autoselects python scope
- bun: Bun - all-in-one JavaScript, TypeScript & JSX toolkit using JavaScriptCore engine
- conda: miniforge
- distrobox: (WSL2 only) - podman and distrobox
- docker: (WSL2 only) - docker, containerd buildx docker-compose
- gcloud: google-cloud-cli
- k8s_base: kubectl, kubelogin, k9s, kubecolor, kubectx, kubens
- k8s_dev: argorollouts, cilium, helm, flux, kustomize cli tools; autoselects k8s_base scope
- k8s_ext: (WSL2 only) - minikube, k3d, kind local kubernetes tools; autoselects docker, k8s_base and k8s_dev scopes
- nodejs: Node.js JavaScript runtime environment, bun, npm
- nodejs: Node.js JavaScript runtime environment using V8 engine
- pwsh: PowerShell Core and corresponding PS modules; autoselects shell scope
- python: uv, prek, pip, venv
- rice: btop, cmatrix, cowsay, fastfetch
Expand Down Expand Up @@ -59,7 +60,7 @@ wsl/wsl_setup.ps1 $Distro -FixNetwork -AddCertificate
$Scope = @('conda', 'pwsh')
$Scope = @('conda', 'k8s_ext', 'pwsh', 'rice')
$Scope = @('az', 'docker', 'shell')
$Scope = @('az', 'k8s_base', 'pwsh', 'nodejs', 'terraform')
$Scope = @('az', 'k8s_base', 'pwsh', 'bun', 'terraform')
$Scope = @('az', 'gcloud', 'k8s_ext', 'pwsh')
wsl/wsl_setup.ps1 $Distro -s $Scope
wsl/wsl_setup.ps1 $Distro -s $Scope -AddCertificate
Expand Down Expand Up @@ -310,6 +311,7 @@ process {
# *determine additional scopes from distro check
switch ($chk) {
{ $_.az } { $scopeSet.Add('az') | Out-Null }
{ $_.bun } { $scopeSet.Add('bun') | Out-Null }
{ $_.conda } { $scopeSet.Add('conda') | Out-Null }
{ $_.gcloud } { $scopeSet.Add('gcloud') | Out-Null }
{ $_.k8s_base } { $scopeSet.Add('k8s_base') | Out-Null }
Expand Down Expand Up @@ -351,15 +353,16 @@ process {
'conda' { 6 }
'az' { 7 }
'gcloud' { 8 }
'nodejs' { 9 }
'terraform' { 10 }
'oh_my_posh' { 11 }
'shell' { 12 }
'zsh' { 13 }
'pwsh' { 14 }
'distrobox' { 15 }
'rice' { 16 }
default { 17 }
'bun' { 9 }
'nodejs' { 10 }
'terraform' { 11 }
'oh_my_posh' { 12 }
'shell' { 13 }
'zsh' { 14 }
'pwsh' { 15 }
'distrobox' { 16 }
'rice' { 17 }
default { 18 }
}
}
# display distro name and installed scopes
Expand Down Expand Up @@ -484,6 +487,11 @@ process {
$rel_azcopy = wsl.exe --distribution $Distro --user root --exec .assets/provision/install_azcopy.sh $Script:rel_azcopy
continue
}
bun {
Show-LogContext 'installing bun'
wsl.exe --distribution $Distro --exec .assets/provision/install_bun.sh
continue
}
conda {
Show-LogContext 'installing conda tools'
wsl.exe --distribution $Distro --exec .assets/provision/install_miniforge.sh --fix_certify true
Expand Down Expand Up @@ -548,7 +556,6 @@ process {
if ($AddCertificate) {
wsl.exe --distribution $Distro --user root --exec .assets/provision/fix_nodejs_certs.sh
}
wsl.exe --distribution $Distro --exec .assets/provision/install_bun.sh
continue
}
oh_my_posh {
Expand Down