From 575088be0d90bf622d05a6a6fc1d85f71e040c1b Mon Sep 17 00:00:00 2001 From: Szymon Osiecki Date: Fri, 17 Nov 2023 22:11:39 +0100 Subject: [PATCH 1/7] refactor(ps): wsl_setup Remove http.postBuffer git setting. --- wsl/wsl_setup.ps1 | 4 ---- 1 file changed, 4 deletions(-) diff --git a/wsl/wsl_setup.ps1 b/wsl/wsl_setup.ps1 index d1163c37..05b6d164 100644 --- a/wsl/wsl_setup.ps1 +++ b/wsl/wsl_setup.ps1 @@ -505,10 +505,6 @@ process { $builder.AppendLine('git config --global core.autocrlf input') | Out-Null $builder.AppendLine('git config --global core.longpaths true') | Out-Null $builder.AppendLine('git config --global push.autoSetupRemote true') | Out-Null - if ($AddCertificate) { - # a guess, that if certs are being installed, you're behind MITM proxy without chunked transfer encoding - $builder.AppendLine('git config --global http.postBuffer 524288000') | Out-Null - } Write-Host 'configuring git...' -ForegroundColor Cyan wsl.exe --distribution $Distro --exec bash -c $builder.ToString().Trim() } From 6ca1b52f3c530438c93128cd1eb0aad597c19410 Mon Sep 17 00:00:00 2001 From: Szymon Osiecki Date: Sat, 18 Nov 2023 11:44:18 +0100 Subject: [PATCH 2/7] refactor(sh): release check for retry logic --- .assets/provision/install_argorolloutscli.sh | 2 +- .assets/provision/install_bat.sh | 2 +- .assets/provision/install_brew.sh | 2 +- .assets/provision/install_etcdctl.sh | 2 +- .assets/provision/install_fonts_cascadiacode.sh | 2 +- .assets/provision/install_gh.sh | 2 +- .assets/provision/install_helm.sh | 2 +- .assets/provision/install_k3d.sh | 2 +- .assets/provision/install_k9s.sh | 2 +- .assets/provision/install_kubectl.sh | 2 +- .assets/provision/install_kubelogin.sh | 2 +- .assets/provision/install_kubeseal.sh | 2 +- .assets/provision/install_minikube.sh | 2 +- .assets/provision/install_omp.sh | 2 +- .assets/provision/install_pwsh.sh | 2 +- .assets/provision/install_ripgrep.sh | 2 +- .assets/provision/install_yq.sh | 2 +- 17 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.assets/provision/install_argorolloutscli.sh b/.assets/provision/install_argorolloutscli.sh index b2c9d387..444490ed 100755 --- a/.assets/provision/install_argorolloutscli.sh +++ b/.assets/provision/install_argorolloutscli.sh @@ -18,7 +18,7 @@ while [ -z "$REL" ]; do printf "\e[33m$APP version couldn't be retrieved\e[0m\n" >&2 exit 0 fi - [ -n "$REL" ] || echo 'retrying...' >&2 + [[ "$REL" =~ ^v?[0-9]+\.[0-9]+\.[0-9]+$ ]] || echo 'retrying...' >&2 done # return latest release echo $REL diff --git a/.assets/provision/install_bat.sh b/.assets/provision/install_bat.sh index e4c6b2f2..7ad4d7ee 100755 --- a/.assets/provision/install_bat.sh +++ b/.assets/provision/install_bat.sh @@ -36,7 +36,7 @@ while [ -z "$REL" ]; do printf "\e[33m$APP version couldn't be retrieved\e[0m\n" >&2 exit 0 fi - [ -n "$REL" ] || echo 'retrying...' >&2 + [[ "$REL" =~ ^v?[0-9]+\.[0-9]+\.[0-9]+$ ]] || echo 'retrying...' >&2 done # return latest release echo $REL diff --git a/.assets/provision/install_brew.sh b/.assets/provision/install_brew.sh index 65e8c9e6..4924ca59 100755 --- a/.assets/provision/install_brew.sh +++ b/.assets/provision/install_brew.sh @@ -19,7 +19,7 @@ while [ -z "$REL" ]; do printf "\e[33m$APP version couldn't be retrieved\e[0m\n" >&2 exit 0 fi - [ -n "$REL" ] || echo 'retrying...' >&2 + [[ "$REL" =~ ^v?[0-9]+\.[0-9]+\.[0-9]+$ ]] || echo 'retrying...' >&2 done # return latest release echo $REL diff --git a/.assets/provision/install_etcdctl.sh b/.assets/provision/install_etcdctl.sh index ff8bdcd5..50c91830 100755 --- a/.assets/provision/install_etcdctl.sh +++ b/.assets/provision/install_etcdctl.sh @@ -18,7 +18,7 @@ while [ -z "$REL" ]; do printf "\e[33m$APP version couldn't be retrieved\e[0m\n" >&2 exit 0 fi - [ -n "$REL" ] || echo 'retrying...' >&2 + [[ "$REL" =~ ^v?[0-9]+\.[0-9]+\.[0-9]+$ ]] || echo 'retrying...' >&2 done # return latest release echo $REL diff --git a/.assets/provision/install_fonts_cascadiacode.sh b/.assets/provision/install_fonts_cascadiacode.sh index d14d7f26..dc25415e 100755 --- a/.assets/provision/install_fonts_cascadiacode.sh +++ b/.assets/provision/install_fonts_cascadiacode.sh @@ -20,7 +20,7 @@ while [ -z "$REL" ]; do printf "\e[33m$APP version couldn't be retrieved\e[0m\n" >&2 exit 0 fi - [ -n "$REL" ] || echo 'retrying...' >&2 + [[ "$REL" =~ ^v?[0-9]+\.[0-9]+\.[0-9]+$ ]] || echo 'retrying...' >&2 done # return latest release echo $REL diff --git a/.assets/provision/install_gh.sh b/.assets/provision/install_gh.sh index a9f00127..5a9a5aef 100755 --- a/.assets/provision/install_gh.sh +++ b/.assets/provision/install_gh.sh @@ -36,7 +36,7 @@ while [ -z "$REL" ]; do printf "\e[33m$APP version couldn't be retrieved\e[0m\n" >&2 exit 0 fi - [ -n "$REL" ] || echo 'retrying...' >&2 + [[ "$REL" =~ ^v?[0-9]+\.[0-9]+\.[0-9]+$ ]] || echo 'retrying...' >&2 done if type $APP &>/dev/null; then diff --git a/.assets/provision/install_helm.sh b/.assets/provision/install_helm.sh index a5e6ca61..8fb2c1e3 100755 --- a/.assets/provision/install_helm.sh +++ b/.assets/provision/install_helm.sh @@ -18,7 +18,7 @@ while [ -z "$REL" ]; do printf "\e[33m$APP version couldn't be retrieved\e[0m\n" >&2 exit 0 fi - [ -n "$REL" ] || echo 'retrying...' >&2 + [[ "$REL" =~ ^v?[0-9]+\.[0-9]+\.[0-9]+$ ]] || echo 'retrying...' >&2 done # return latest release echo $REL diff --git a/.assets/provision/install_k3d.sh b/.assets/provision/install_k3d.sh index e084d920..1b6cb80b 100755 --- a/.assets/provision/install_k3d.sh +++ b/.assets/provision/install_k3d.sh @@ -18,7 +18,7 @@ while [ -z "$REL" ]; do printf "\e[33m$APP version couldn't be retrieved\e[0m\n" >&2 exit 0 fi - [ -n "$REL" ] || echo 'retrying...' >&2 + [[ "$REL" =~ ^v?[0-9]+\.[0-9]+\.[0-9]+$ ]] || echo 'retrying...' >&2 done # return latest release echo $REL diff --git a/.assets/provision/install_k9s.sh b/.assets/provision/install_k9s.sh index 15f030c5..9e97fb1c 100755 --- a/.assets/provision/install_k9s.sh +++ b/.assets/provision/install_k9s.sh @@ -18,7 +18,7 @@ while [ -z "$REL" ]; do printf "\e[33m$APP version couldn't be retrieved\e[0m\n" >&2 exit 0 fi - [ -n "$REL" ] || echo 'retrying...' >&2 + [[ "$REL" =~ ^v?[0-9]+\.[0-9]+\.[0-9]+$ ]] || echo 'retrying...' >&2 done # return latest release echo $REL diff --git a/.assets/provision/install_kubectl.sh b/.assets/provision/install_kubectl.sh index d1bedd78..c515d13b 100755 --- a/.assets/provision/install_kubectl.sh +++ b/.assets/provision/install_kubectl.sh @@ -30,7 +30,7 @@ while [ -z "$REL" ]; do printf "\e[33m$APP version couldn't be retrieved\e[0m\n" >&2 exit 0 fi - [ -n "$REL" ] || echo 'retrying...' >&2 + [[ "$REL" =~ ^v?[0-9]+\.[0-9]+\.[0-9]+$ ]] || echo 'retrying...' >&2 done # return latest release echo $REL diff --git a/.assets/provision/install_kubelogin.sh b/.assets/provision/install_kubelogin.sh index ede419bb..c50d9578 100755 --- a/.assets/provision/install_kubelogin.sh +++ b/.assets/provision/install_kubelogin.sh @@ -18,7 +18,7 @@ while [ -z "$REL" ]; do printf "\e[33m$APP version couldn't be retrieved\e[0m\n" >&2 exit 0 fi - [ -n "$REL" ] || echo 'retrying...' >&2 + [[ "$REL" =~ ^v?[0-9]+\.[0-9]+\.[0-9]+$ ]] || echo 'retrying...' >&2 done # return latest release echo $REL diff --git a/.assets/provision/install_kubeseal.sh b/.assets/provision/install_kubeseal.sh index 79001401..76e0c2ba 100755 --- a/.assets/provision/install_kubeseal.sh +++ b/.assets/provision/install_kubeseal.sh @@ -18,7 +18,7 @@ while [ -z "$REL" ]; do printf "\e[33m$APP version couldn't be retrieved\e[0m\n" >&2 exit 0 fi - [ -n "$REL" ] || echo 'retrying...' >&2 + [[ "$REL" =~ ^v?[0-9]+\.[0-9]+\.[0-9]+$ ]] || echo 'retrying...' >&2 done # return latest release echo $REL diff --git a/.assets/provision/install_minikube.sh b/.assets/provision/install_minikube.sh index 580a39be..118891ca 100755 --- a/.assets/provision/install_minikube.sh +++ b/.assets/provision/install_minikube.sh @@ -30,7 +30,7 @@ while [ -z "$REL" ]; do printf "\e[33m$APP version couldn't be retrieved\e[0m\n" >&2 exit 0 fi - [ -n "$REL" ] || echo 'retrying...' >&2 + [[ "$REL" =~ ^v?[0-9]+\.[0-9]+\.[0-9]+$ ]] || echo 'retrying...' >&2 done # return latest release echo $REL diff --git a/.assets/provision/install_omp.sh b/.assets/provision/install_omp.sh index f7f8bbe0..d6211a59 100755 --- a/.assets/provision/install_omp.sh +++ b/.assets/provision/install_omp.sh @@ -18,7 +18,7 @@ while [ -z "$REL" ]; do printf "\e[33m$APP version couldn't be retrieved\e[0m\n" >&2 exit 0 fi - [ -n "$REL" ] || echo 'retrying...' >&2 + [[ "$REL" =~ ^v?[0-9]+\.[0-9]+\.[0-9]+$ ]] || echo 'retrying...' >&2 done # return latest release echo $REL diff --git a/.assets/provision/install_pwsh.sh b/.assets/provision/install_pwsh.sh index 7dce249c..8d3516c1 100755 --- a/.assets/provision/install_pwsh.sh +++ b/.assets/provision/install_pwsh.sh @@ -18,7 +18,7 @@ while [ -z "$REL" ]; do printf "\e[33m$APP version couldn't be retrieved\e[0m\n" >&2 exit 0 fi - [ -n "$REL" ] || echo 'retrying...' >&2 + [[ "$REL" =~ ^v?[0-9]+\.[0-9]+\.[0-9]+$ ]] || echo 'retrying...' >&2 done # return latest release echo $REL diff --git a/.assets/provision/install_ripgrep.sh b/.assets/provision/install_ripgrep.sh index e154c66a..e21a44f0 100755 --- a/.assets/provision/install_ripgrep.sh +++ b/.assets/provision/install_ripgrep.sh @@ -36,7 +36,7 @@ while [ -z "$REL" ]; do printf "\e[33m$APP version couldn't be retrieved\e[0m\n" >&2 exit 0 fi - [ -n "$REL" ] || echo 'retrying...' >&2 + [[ "$REL" =~ ^v?[0-9]+\.[0-9]+\.[0-9]+$ ]] || echo 'retrying...' >&2 done # return latest release echo $REL diff --git a/.assets/provision/install_yq.sh b/.assets/provision/install_yq.sh index cce9e385..ff60719f 100755 --- a/.assets/provision/install_yq.sh +++ b/.assets/provision/install_yq.sh @@ -18,7 +18,7 @@ while [ -z "$REL" ]; do printf "\e[33m$APP version couldn't be retrieved\e[0m\n" >&2 exit 0 fi - [ -n "$REL" ] || echo 'retrying...' >&2 + [[ "$REL" =~ ^v?[0-9]+\.[0-9]+\.[0-9]+$ ]] || echo 'retrying...' >&2 done # return latest release echo $REL From e6f87ff273c11c9dc8a20ca54514cf03cc4baa6b Mon Sep 17 00:00:00 2001 From: Szymon Osiecki Date: Sat, 18 Nov 2023 12:54:10 +0100 Subject: [PATCH 3/7] refactor(sh): unify downloading to tmp folder --- .assets/config/bash_cfg/functions.sh | 0 .assets/provision/install_argorolloutscli.sh | 8 ++++--- .assets/provision/install_base.sh | 2 +- .assets/provision/install_bat.sh | 10 ++++---- .assets/provision/install_edge.sh | 2 +- .assets/provision/install_etcdctl.sh | 2 +- .assets/provision/install_exa.sh | 6 ++--- .assets/provision/install_eza.sh | 6 ++--- .assets/provision/install_fastfetch.sh | 9 ++++--- .../provision/install_fonts_cascadiacode.sh | 8 +++---- .assets/provision/install_fonts_nerd.sh | 4 ++-- .assets/provision/install_k9s.sh | 6 ++--- .assets/provision/install_kubectl-convert.sh | 8 ++++--- .assets/provision/install_kubectl.sh | 10 ++++---- .assets/provision/install_kubelogin.sh | 6 ++--- .assets/provision/install_kubeseal.sh | 6 ++--- .assets/provision/install_kustomize.sh | 3 ++- .assets/provision/install_miniconda.sh | 8 ++++--- .assets/provision/install_minikube.sh | 16 ++++++++----- .assets/provision/install_omp.sh | 8 ++++--- .assets/provision/install_pwsh.sh | 24 ++++++++++++------- .assets/provision/install_ripgrep.sh | 2 +- .assets/provision/install_yq.sh | 2 +- .assets/provision/setup_gnome.sh | 3 ++- .assets/provision/setup_omp.sh | 2 +- 25 files changed, 94 insertions(+), 67 deletions(-) mode change 100755 => 100644 .assets/config/bash_cfg/functions.sh diff --git a/.assets/config/bash_cfg/functions.sh b/.assets/config/bash_cfg/functions.sh old mode 100755 new mode 100644 diff --git a/.assets/provision/install_argorolloutscli.sh b/.assets/provision/install_argorolloutscli.sh index 444490ed..7679e816 100755 --- a/.assets/provision/install_argorolloutscli.sh +++ b/.assets/provision/install_argorolloutscli.sh @@ -32,9 +32,11 @@ if type $APP &>/dev/null; then fi printf "\e[92minstalling \e[1m$APP\e[22m v$REL\e[0m\n" >&2 +TMP_DIR=$(mktemp -dp "$PWD") retry_count=0 -while [[ ! -f kubectl-argo-rollouts-linux-amd64 && $retry_count -lt 10 ]]; do - curl -LsOk "https://github.com/argoproj/argo-rollouts/releases/download/v${REL}/kubectl-argo-rollouts-linux-amd64" +while [[ ! -f "$TMP_DIR/$APP" && $retry_count -lt 10 ]]; do + curl -sLko "$TMP_DIR/$APP" "https://github.com/argoproj/argo-rollouts/releases/download/v${REL}/kubectl-argo-rollouts-linux-amd64" ((retry_count++)) done -install -m 0755 kubectl-argo-rollouts-linux-amd64 /usr/local/bin/kubectl-argo-rollouts && rm -f kubectl-argo-rollouts-linux-amd64 +install -m 0755 "$TMP_DIR/$APP" /usr/local/bin/kubectl-argo-rollouts +rm -fr "$TMP_DIR" diff --git a/.assets/provision/install_base.sh b/.assets/provision/install_base.sh index dc361d82..81ac81c3 100755 --- a/.assets/provision/install_base.sh +++ b/.assets/provision/install_base.sh @@ -27,7 +27,7 @@ arch) fi exit 1 fi - sudo -u $user bash -c 'git clone https://aur.archlinux.org/paru-bin.git && cd paru-bin && makepkg -si --noconfirm && cd .. && rm -fr paru-bin' + sudo -u $user bash -c 'git clone https://aur.archlinux.org/paru-bin.git && cd paru-bin && makepkg -si --noconfirm && cd ..; rm -fr paru-bin' grep -qw '^BottomUp' /etc/paru.conf || sed -i 's/^#BottomUp/BottomUp/' /etc/paru.conf fi ;; diff --git a/.assets/provision/install_bat.sh b/.assets/provision/install_bat.sh index 7ad4d7ee..1bd943c8 100755 --- a/.assets/provision/install_bat.sh +++ b/.assets/provision/install_bat.sh @@ -62,12 +62,14 @@ fedora) ;; debian | ubuntu) export DEBIAN_FRONTEND=noninteractive + TMP_DIR=$(mktemp -dp "$PWD") retry_count=0 - while [[ ! -f $APP.deb && $retry_count -lt 10 ]]; do - curl -Lsk -o $APP.deb "https://github.com/sharkdp/bat/releases/download/v${REL}/bat_${REL}_amd64.deb" + while [[ ! -f "$TMP_DIR/$APP.deb" && $retry_count -lt 10 ]]; do + curl -sLko "$TMP_DIR/$APP.deb" "https://github.com/sharkdp/bat/releases/download/v${REL}/bat_${REL}_amd64.deb" ((retry_count++)) done - dpkg -i $APP.deb >&2 2>/dev/null && rm -f $APP.deb || binary=true + dpkg -i "$TMP_DIR/$APP.deb" >&2 2>/dev/null || binary=true + rm -fr "$TMP_DIR" ;; opensuse) zypper in -y $APP >&2 2>/dev/null || binary=true @@ -82,7 +84,7 @@ if [ "$binary" = true ]; then TMP_DIR=$(mktemp -dp "$PWD") retry_count=0 while [[ ! -f "$TMP_DIR/bat" && $retry_count -lt 10 ]]; do - curl -Lsk "https://github.com/sharkdp/bat/releases/download/v${REL}/bat-v${REL}-x86_64-unknown-linux-gnu.tar.gz" | tar -zx --strip-components=1 -C "$TMP_DIR" + curl -sLk "https://github.com/sharkdp/bat/releases/download/v${REL}/bat-v${REL}-x86_64-unknown-linux-gnu.tar.gz" | tar -zx --strip-components=1 -C "$TMP_DIR" ((retry_count++)) done install -m 0755 "$TMP_DIR/bat" /usr/bin/ diff --git a/.assets/provision/install_edge.sh b/.assets/provision/install_edge.sh index 5d3cdd66..44eddafe 100755 --- a/.assets/provision/install_edge.sh +++ b/.assets/provision/install_edge.sh @@ -40,7 +40,7 @@ debian | ubuntu) [ -f /etc/apt/trusted.gpg.d/microsoft.gpg ] || curl -fsSLk https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor >microsoft.gpg install -m 644 microsoft.gpg /usr/share/keyrings/ sh -c 'echo "deb [arch=amd64 signed-by=/usr/share/keyrings/microsoft.gpg] https://packages.microsoft.com/repos/edge stable main" > /etc/apt/sources.list.d/microsoft-edge.list' - rm microsoft.gpg + rm -f microsoft.gpg apt-get update && apt-get install -y microsoft-edge-stable ;; opensuse) diff --git a/.assets/provision/install_etcdctl.sh b/.assets/provision/install_etcdctl.sh index 50c91830..182a63cc 100755 --- a/.assets/provision/install_etcdctl.sh +++ b/.assets/provision/install_etcdctl.sh @@ -35,7 +35,7 @@ printf "\e[92minstalling \e[1m$APP\e[22m v$REL\e[0m\n" >&2 TMP_DIR=$(mktemp -dp "$PWD") retry_count=0 while [[ ! -f "$TMP_DIR/etcdctl" && $retry_count -lt 10 ]]; do - curl -Lsk "https://github.com/etcd-io/etcd/releases/download/v${REL}/etcd-v${REL}-linux-amd64.tar.gz" | tar -zx --strip-components=1 --no-same-owner -C "$TMP_DIR" + curl -sLk "https://github.com/etcd-io/etcd/releases/download/v${REL}/etcd-v${REL}-linux-amd64.tar.gz" | tar -zx --strip-components=1 --no-same-owner -C "$TMP_DIR" ((retry_count++)) done install -m 0755 "$TMP_DIR/etcdctl" /usr/local/bin/ diff --git a/.assets/provision/install_exa.sh b/.assets/provision/install_exa.sh index 87327d06..00bb407f 100755 --- a/.assets/provision/install_exa.sh +++ b/.assets/provision/install_exa.sh @@ -76,11 +76,11 @@ if [ "$binary" = true ]; then echo 'Installing from binary.' >&2 TMP_DIR=$(mktemp -dp "$PWD") retry_count=0 - while [[ ! -f "$TMP_DIR/exa-linux-x86_64.zip" && $retry_count -lt 10 ]]; do - curl -Lsk -o "$TMP_DIR/exa-linux-x86_64.zip" "https://github.com/ogham/exa/releases/download/v${REL}/exa-linux-x86_64-v${REL}.zip" + while [[ ! -f "$TMP_DIR/$APP.zip" && $retry_count -lt 10 ]]; do + curl -sLko "$TMP_DIR/$APP.zip" "https://github.com/ogham/exa/releases/download/v${REL}/exa-linux-x86_64-v${REL}.zip" ((retry_count++)) done - unzip -q "$TMP_DIR/exa-linux-x86_64.zip" -d "$TMP_DIR" + unzip -q "$TMP_DIR/$APP.zip" -d "$TMP_DIR" install -m 0755 "$TMP_DIR/bin/exa" /usr/bin/ install -m 0644 "$TMP_DIR/man/exa.1" "$(manpath | cut -d : -f 1)/man1/" install -m 0644 "$TMP_DIR/man/exa_colors.5" "$(manpath | cut -d : -f 1)/man5/" diff --git a/.assets/provision/install_eza.sh b/.assets/provision/install_eza.sh index e71db3d5..b7a1ce0b 100755 --- a/.assets/provision/install_eza.sh +++ b/.assets/provision/install_eza.sh @@ -90,11 +90,11 @@ if [ "$binary" = true ]; then echo 'Installing from binary.' >&2 TMP_DIR=$(mktemp -dp "$PWD") retry_count=0 - while [[ ! -f "$TMP_DIR/eza-linux-x86_64.tar.gz" && $retry_count -lt 10 ]]; do - curl -Lsk -o "$TMP_DIR/eza-linux-x86_64.tar.gz" "https://github.com/eza-community/eza/releases/download/v${REL}/eza_x86_64-unknown-linux-${lib}.tar.gz" + while [[ ! -f "$TMP_DIR/$APP.tar.gz" && $retry_count -lt 10 ]]; do + curl -sLko "$TMP_DIR/$APP.tar.gz" "https://github.com/eza-community/eza/releases/download/v${REL}/eza_x86_64-unknown-linux-${lib}.tar.gz" ((retry_count++)) done - tar -zxf "$TMP_DIR/eza-linux-x86_64.tar.gz" -C "$TMP_DIR" + tar -zxf "$TMP_DIR/$APP.tar.gz" -C "$TMP_DIR" install -m 0755 "$TMP_DIR/eza" /usr/bin/ rm -fr "$TMP_DIR" fi diff --git a/.assets/provision/install_fastfetch.sh b/.assets/provision/install_fastfetch.sh index 4b64cfe0..56ae3e3e 100755 --- a/.assets/provision/install_fastfetch.sh +++ b/.assets/provision/install_fastfetch.sh @@ -69,11 +69,14 @@ fedora) ;; debian | ubuntu) export DEBIAN_FRONTEND=noninteractive - while [[ ! -f $APP.deb && $retry_count -lt 10 ]]; do - curl -Lsk -o $APP.deb "https://github.com/fastfetch-cli/fastfetch/releases/download/${REL}/fastfetch-${REL}-Linux.deb" + TMP_DIR=$(mktemp -dp "$PWD") + retry_count=0 + while [[ ! -f "$TMP_DIR/$APP.deb" && $retry_count -lt 10 ]]; do + curl -sLko "$TMP_DIR/$APP.deb" "https://github.com/fastfetch-cli/fastfetch/releases/download/${REL}/fastfetch-${REL}-Linux.deb" ((retry_count++)) done - dpkg -i $APP.deb >&2 2>/dev/null && rm -f $APP.deb + dpkg -i "$TMP_DIR/$APP.deb" >&2 2>/dev/null + rm -fr "$TMP_DIR" ;; opensuse) zypper in -y $APP >&2 2>/dev/null diff --git a/.assets/provision/install_fonts_cascadiacode.sh b/.assets/provision/install_fonts_cascadiacode.sh index dc25415e..50662274 100755 --- a/.assets/provision/install_fonts_cascadiacode.sh +++ b/.assets/provision/install_fonts_cascadiacode.sh @@ -10,8 +10,7 @@ fi # variables REL=$1 -TMP_DIR=$(mktemp -dp "$PWD") - +retry_count=0 # get latest release if not provided as a parameter while [ -z "$REL" ]; do REL=$(curl -sk https://api.github.com/repos/microsoft/cascadia-code/releases/latest | sed -En 's/.*"tag_name": "v?([^"]*)".*/\1/p') @@ -26,9 +25,10 @@ done echo $REL echo "Install CascadiaCode v$REL" >&2 +TMP_DIR=$(mktemp -dp "$PWD") retry_count=0 -while [[ ! -f CascadiaCode.zip && $retry_count -lt 10 ]]; do - curl -Lsk -o "$TMP_DIR/CascadiaCode.zip" "https://github.com/microsoft/cascadia-code/releases/download/v${REL}/CascadiaCode-${REL}.zip" +while [[ ! -f "$TMP_DIR/CascadiaCode.zip" && $retry_count -lt 10 ]]; do + curl -sLko "$TMP_DIR/CascadiaCode.zip" "https://github.com/microsoft/cascadia-code/releases/download/v${REL}/CascadiaCode-${REL}.zip" ((retry_count++)) done unzip -q "$TMP_DIR/CascadiaCode.zip" -d "$TMP_DIR" diff --git a/.assets/provision/install_fonts_nerd.sh b/.assets/provision/install_fonts_nerd.sh index c707a188..2ade4a68 100755 --- a/.assets/provision/install_fonts_nerd.sh +++ b/.assets/provision/install_fonts_nerd.sh @@ -85,12 +85,12 @@ if [ -n "$1" ]; then fc-cache -f /usr/share/fonts else echo "installing '$font' font..." >&2 - TMP_DIR=$(mktemp -dp "$PWD") http_code=$(curl -Lo /dev/null --silent -Iw '%{http_code}' "https://github.com/ryanoasis/nerd-fonts/releases/latest/download/${font}.zip") if [ $http_code -eq 200 ]; then + TMP_DIR=$(mktemp -dp "$PWD") retry_count=0 while [[ ! -f "$TMP_DIR/$font.zip" && $retry_count -lt 10 ]]; do - curl -Lsk -o "$TMP_DIR/$font.zip" "https://github.com/ryanoasis/nerd-fonts/releases/latest/download/${font}.zip" + curl -sLko "$TMP_DIR/$font.zip" "https://github.com/ryanoasis/nerd-fonts/releases/latest/download/${font}.zip" ((retry_count++)) done unzip -q "$TMP_DIR/$font.zip" -d "$TMP_DIR" diff --git a/.assets/provision/install_k9s.sh b/.assets/provision/install_k9s.sh index 9e97fb1c..a63c2a24 100755 --- a/.assets/provision/install_k9s.sh +++ b/.assets/provision/install_k9s.sh @@ -34,11 +34,11 @@ fi printf "\e[92minstalling \e[1m$APP\e[22m v$REL\e[0m\n" >&2 TMP_DIR=$(mktemp -dp "$PWD") retry_count=0 -while [[ ! -f "$TMP_DIR/k9s.tgz" && $retry_count -lt 10 ]]; do - curl -Lsk -o "$TMP_DIR/k9s.tgz" "https://github.com/derailed/k9s/releases/download/v${REL}/k9s_Linux_amd64.tar.gz" +while [[ ! -f "$TMP_DIR/k9s.tar.gz" && $retry_count -lt 10 ]]; do + curl -sLko "$TMP_DIR/k9s.tar.gz" "https://github.com/derailed/k9s/releases/download/v${REL}/k9s_Linux_amd64.tar.gz" ((retry_count++)) done -tar -zxvf "$TMP_DIR/k9s.tgz" -C "$TMP_DIR" +tar -zxvf "$TMP_DIR/k9s.tar.gz" -C "$TMP_DIR" mkdir -p /opt/k9s install -m 0755 "$TMP_DIR/k9s" /opt/k9s/ [ -f /usr/bin/k9s ] || ln -s /opt/k9s/k9s /usr/bin/k9s diff --git a/.assets/provision/install_kubectl-convert.sh b/.assets/provision/install_kubectl-convert.sh index 0f232d76..d9fd63ac 100755 --- a/.assets/provision/install_kubectl-convert.sh +++ b/.assets/provision/install_kubectl-convert.sh @@ -9,10 +9,12 @@ fi APP='kubectl-convert' +TMP_DIR=$(mktemp -dp "$PWD") retry_count=0 -while [[ ! -f kubectl-convert && $retry_count -lt 10 ]]; do - curl -LOsk "https://dl.k8s.io/release/$(curl -Lsk https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl-convert" +while [[ ! -f "$TMP_DIR/$APP" && $retry_count -lt 10 ]]; do + curl -sLko "$TMP_DIR/$APP" "https://dl.k8s.io/release/$(curl -sLk https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl-convert" ((retry_count++)) done # install -install -m 0755 kubectl-convert /usr/bin/ && rm -f kubectl-convert +install -m 0755 "$TMP_DIR/$APP" /usr/bin/ +rm -fr "$TMP_DIR" diff --git a/.assets/provision/install_kubectl.sh b/.assets/provision/install_kubectl.sh index c515d13b..c2396d94 100755 --- a/.assets/provision/install_kubectl.sh +++ b/.assets/provision/install_kubectl.sh @@ -24,7 +24,7 @@ REL=$1 retry_count=0 # try 10 times to get latest release if not provided as a parameter while [ -z "$REL" ]; do - REL=$(curl -Lsk https://dl.k8s.io/release/stable.txt) + REL=$(curl -sLk https://dl.k8s.io/release/stable.txt) ((retry_count++)) if [ $retry_count -eq 10 ]; then printf "\e[33m$APP version couldn't be retrieved\e[0m\n" >&2 @@ -66,11 +66,13 @@ esac if [ "$binary" = true ]; then echo 'Installing from binary.' >&2 + TMP_DIR=$(mktemp -dp "$PWD") retry_count=0 - while [[ ! -f kubectl && $retry_count -lt 10 ]]; do - curl -LOsk "https://dl.k8s.io/release/$(curl -Lsk https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" + while [[ ! -f "$TMP_DIR/$APP" && $retry_count -lt 10 ]]; do + curl -sLko "$TMP_DIR/$APP" "https://dl.k8s.io/release/$(curl -sLk https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" ((retry_count++)) done # install - install -m 0755 kubectl /usr/bin/ && rm -f kubectl + install -m 0755 "$TMP_DIR/$APP" /usr/bin/ + rm -fr "$TMP_DIR" fi diff --git a/.assets/provision/install_kubelogin.sh b/.assets/provision/install_kubelogin.sh index c50d9578..f59d3212 100755 --- a/.assets/provision/install_kubelogin.sh +++ b/.assets/provision/install_kubelogin.sh @@ -34,10 +34,10 @@ fi printf "\e[92minstalling \e[1m$APP\e[22m v$REL\e[0m\n" >&2 TMP_DIR=$(mktemp -dp "$PWD") retry_count=0 -while [[ ! -f "$TMP_DIR/kubelogin.zip" && $retry_count -lt 10 ]]; do - curl -Lsk -o "$TMP_DIR/kubelogin.zip" "https://github.com/Azure/kubelogin/releases/download/v${REL}/kubelogin-linux-amd64.zip" +while [[ ! -f "$TMP_DIR/$APP.zip" && $retry_count -lt 10 ]]; do + curl -sLko "$TMP_DIR/$APP.zip" "https://github.com/Azure/kubelogin/releases/download/v${REL}/kubelogin-linux-amd64.zip" ((retry_count++)) done -unzip -q "$TMP_DIR/kubelogin.zip" -d "$TMP_DIR" +unzip -q "$TMP_DIR/$APP.zip" -d "$TMP_DIR" install -m 0755 "$TMP_DIR/bin/linux_amd64/kubelogin" /usr/local/bin/ rm -fr "$TMP_DIR" diff --git a/.assets/provision/install_kubeseal.sh b/.assets/provision/install_kubeseal.sh index 76e0c2ba..804a5cd1 100755 --- a/.assets/provision/install_kubeseal.sh +++ b/.assets/provision/install_kubeseal.sh @@ -34,9 +34,9 @@ fi printf "\e[92minstalling \e[1m$APP\e[22m v$REL\e[0m\n" >&2 TMP_DIR=$(mktemp -dp "$PWD") retry_count=0 -while [[ ! -f "$TMP_DIR/kubeseal" && $retry_count -lt 10 ]]; do - curl -Lsk "https://github.com/bitnami-labs/sealed-secrets/releases/download/v${REL}/kubeseal-${REL}-linux-amd64.tar.gz" | tar -zx -C "$TMP_DIR" +while [[ ! -f "$TMP_DIR/$APP" && $retry_count -lt 10 ]]; do + curl -sLk "https://github.com/bitnami-labs/sealed-secrets/releases/download/v${REL}/kubeseal-${REL}-linux-amd64.tar.gz" | tar -zx -C "$TMP_DIR" ((retry_count++)) done -install -m 0755 "$TMP_DIR/kubeseal" /usr/local/bin/ +install -m 0755 "$TMP_DIR/$APP" /usr/local/bin/ rm -fr "$TMP_DIR" diff --git a/.assets/provision/install_kustomize.sh b/.assets/provision/install_kustomize.sh index 3c27672c..2b6fb787 100755 --- a/.assets/provision/install_kustomize.sh +++ b/.assets/provision/install_kustomize.sh @@ -36,6 +36,7 @@ while [[ ! -f kustomize && $retry_count -lt 10 ]]; do curl -sk 'https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh' | bash ((retry_count++)) done -install -m 0755 kustomize /usr/local/bin/ && rm -f kustomize +install -m 0755 kustomize /usr/local/bin/ +rm -f kustomize exit 0 diff --git a/.assets/provision/install_miniconda.sh b/.assets/provision/install_miniconda.sh index 6c7417ed..b7682e00 100755 --- a/.assets/provision/install_miniconda.sh +++ b/.assets/provision/install_miniconda.sh @@ -42,12 +42,14 @@ if [ -d "$HOME/miniconda3" ]; then conda_init else printf "\e[92minstalling \e[1mminiconda\e[0m\n" + TMP_DIR=$(mktemp -dp "$PWD") retry_count=0 - while [[ ! -f miniconda.sh && $retry_count -lt 10 ]]; do - curl -fsSLk -o miniconda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh + while [[ ! -f "$TMP_DIR/miniconda.sh" && $retry_count -lt 10 ]]; do + curl -sLko "$TMP_DIR/miniconda.sh" https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh ((retry_count++)) done - bash ./miniconda.sh -b -p "$HOME/miniconda3" >/dev/null && rm ./miniconda.sh + bash $TMP_DIR/miniconda.sh -b -p "$HOME/miniconda3" >/dev/null + rm -fr "$TMP_DIR" # disable auto activation of the base conda environment conda_init conda config --set auto_activate_base false diff --git a/.assets/provision/install_minikube.sh b/.assets/provision/install_minikube.sh index 118891ca..c981ca00 100755 --- a/.assets/provision/install_minikube.sh +++ b/.assets/provision/install_minikube.sh @@ -53,12 +53,14 @@ fedora) ;; debian | ubuntu) export DEBIAN_FRONTEND=noninteractive + TMP_DIR=$(mktemp -dp "$PWD") retry_count=0 - while [[ ! -f minikube_latest_amd64.deb && $retry_count -lt 10 ]]; do - curl -LOsk "https://storage.googleapis.com/minikube/releases/latest/minikube_latest_amd64.deb" + while [[ ! -f "$TMP_DIR/$APP.deb" && $retry_count -lt 10 ]]; do + curl -sLko "$TMP_DIR/$APP.deb" "https://storage.googleapis.com/minikube/releases/latest/minikube_latest_amd64.deb" ((retry_count++)) done - dpkg -i minikube_latest_amd64.deb >&2 2>/dev/null && rm -f minikube_latest_amd64.deb || binary=true + dpkg -i "$TMP_DIR/$APP.deb" >&2 2>/dev/null || binary=true + rm -fr "$TMP_DIR" ;; opensuse) zypper in -y --allow-unsigned-rpm "https://storage.googleapis.com/minikube/releases/latest/minikube-latest.x86_64.rpm" >&2 2>/dev/null || binary=true @@ -70,10 +72,12 @@ esac if [ "$binary" = true ]; then echo 'Installing from binary.' >&2 + TMP_DIR=$(mktemp -dp "$PWD") retry_count=0 - while [[ ! -f minikube-linux-amd64 && $retry_count -lt 10 ]]; do - curl -LOsk "https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64" + while [[ ! -f "$TMP_DIR/$APP" && $retry_count -lt 10 ]]; do + curl -sLko "$TMP_DIR/$APP" "https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64" ((retry_count++)) done - install -m 0755 minikube-linux-amd64 /usr/local/bin/minikube + install -m 0755 "$TMP_DIR/$APP" /usr/local/bin/minikube + rm -fr "$TMP_DIR" fi diff --git a/.assets/provision/install_omp.sh b/.assets/provision/install_omp.sh index d6211a59..40fa350c 100755 --- a/.assets/provision/install_omp.sh +++ b/.assets/provision/install_omp.sh @@ -32,9 +32,11 @@ if type $APP &>/dev/null; then fi printf "\e[92minstalling \e[1m$APP\e[22m v$REL\e[0m\n" >&2 +TMP_DIR=$(mktemp -dp "$PWD") retry_count=0 -while [[ ! -f posh-linux-amd64 && $retry_count -lt 10 ]]; do - curl -LsOk "https://github.com/JanDeDobbeleer/oh-my-posh/releases/download/v${REL}/posh-linux-amd64" +while [[ ! -f "$TMP_DIR/$APP" && $retry_count -lt 10 ]]; do + curl -sLko "$TMP_DIR/$APP" "https://github.com/JanDeDobbeleer/oh-my-posh/releases/download/v${REL}/posh-linux-amd64" ((retry_count++)) done -install -m 0755 posh-linux-amd64 /usr/bin/oh-my-posh && rm -f posh-linux-amd64 +install -m 0755 "$TMP_DIR/$APP" /usr/bin/oh-my-posh +rm -fr "$TMP_DIR" diff --git a/.assets/provision/install_pwsh.sh b/.assets/provision/install_pwsh.sh index 8d3516c1..d7c1057d 100755 --- a/.assets/provision/install_pwsh.sh +++ b/.assets/provision/install_pwsh.sh @@ -39,12 +39,14 @@ case $SYS_ID in alpine) apk add --no-cache ncurses-terminfo-base krb5-libs libgcc libintl libssl1.1 libstdc++ tzdata userspace-rcu zlib icu-libs >&2 2>/dev/null apk -X https://dl-cdn.alpinelinux.org/alpine/edge/main add --no-cache lttng-ust >&2 2>/dev/null + TMP_DIR=$(mktemp -dp "$PWD") retry_count=0 - while [[ ! -f powershell.tar.gz && $retry_count -lt 10 ]]; do - curl -Lsk -o powershell.tar.gz "https://github.com/PowerShell/PowerShell/releases/download/v${REL}/powershell-${REL}-linux-alpine-x64.tar.gz" + while [[ ! -f "$TMP_DIR/$APP.tar.gz" && $retry_count -lt 10 ]]; do + curl -sLko "$TMP_DIR/$APP.tar.gz" "https://github.com/PowerShell/PowerShell/releases/download/v${REL}/powershell-${REL}-linux-alpine-x64.tar.gz" ((retry_count++)) done - mkdir -p /opt/microsoft/powershell/7 && tar -zxf powershell.tar.gz -C /opt/microsoft/powershell/7 && rm powershell.tar.gz + mkdir -p /opt/microsoft/powershell/7 && tar -zxf "$TMP_DIR/$APP.tar.gz" -C /opt/microsoft/powershell/7 + rm -fr "$TMP_DIR" chmod +x /opt/microsoft/powershell/7/pwsh && ln -s /opt/microsoft/powershell/7/pwsh /usr/bin/pwsh ;; arch) @@ -69,12 +71,14 @@ fedora) debian | ubuntu) export DEBIAN_FRONTEND=noninteractive [ "$SYS_ID" = 'debian' ] && apt-get update >&2 && apt-get install -y libicu67 >&2 2>/dev/null || true + TMP_DIR=$(mktemp -dp "$PWD") retry_count=0 - while [[ ! -f powershell.deb && $retry_count -lt 10 ]]; do - curl -Lsk -o powershell.deb "https://github.com/PowerShell/PowerShell/releases/download/v${REL}/powershell_${REL}-1.deb_amd64.deb" + while [[ ! -f "$TMP_DIR/$APP.deb" && $retry_count -lt 10 ]]; do + curl -sLko "$TMP_DIR/$APP.deb" "https://github.com/PowerShell/PowerShell/releases/download/v${REL}/powershell_${REL}-1.deb_amd64.deb" ((retry_count++)) done - dpkg -i powershell.deb && rm -f powershell.deb >&2 2>/dev/null || binary=true + dpkg -i "$TMP_DIR/$APP.deb" >&2 2>/dev/null || binary=true + rm -fr "$TMP_DIR" ;; *) binary=true @@ -84,13 +88,15 @@ esac if [ "$binary" = true ]; then echo 'Installing from binary.' >&2 [ "$SYS_ID" = 'opensuse' ] && zypper in -y libicu >&2 2>/dev/null || true + TMP_DIR=$(mktemp -dp "$PWD") retry_count=0 - while [[ ! -f powershell.tar.gz && $retry_count -lt 10 ]]; do - curl -Lsk -o powershell.tar.gz "https://github.com/PowerShell/PowerShell/releases/download/v${REL}/powershell-${REL}-linux-x64.tar.gz" + while [[ ! -f "$TMP_DIR/$APP.tar.gz" && $retry_count -lt 10 ]]; do + curl -sLko "$TMP_DIR/$APP.tar.gz" "https://github.com/PowerShell/PowerShell/releases/download/v${REL}/powershell-${REL}-linux-x64.tar.gz" ((retry_count++)) done mkdir -p /opt/microsoft/powershell/7 - tar -zxf powershell.tar.gz -C /opt/microsoft/powershell/7 && rm -f powershell.tar.gz + tar -zxf "$TMP_DIR/$APP.tar.gz" -C /opt/microsoft/powershell/7 + rm -fr "$TMP_DIR" chmod +x /opt/microsoft/powershell/7/pwsh [ -f /usr/bin/pwsh ] || ln -s /opt/microsoft/powershell/7/pwsh /usr/bin/pwsh fi diff --git a/.assets/provision/install_ripgrep.sh b/.assets/provision/install_ripgrep.sh index e21a44f0..9f95871a 100755 --- a/.assets/provision/install_ripgrep.sh +++ b/.assets/provision/install_ripgrep.sh @@ -77,7 +77,7 @@ if [ "$binary" = true ]; then TMP_DIR=$(mktemp -dp "$PWD") retry_count=0 while [[ ! -f "$TMP_DIR/rg" && $retry_count -lt 10 ]]; do - curl -Lsk "https://github.com/BurntSushi/ripgrep/releases/download/${REL}/ripgrep-${REL}-x86_64-unknown-linux-musl.tar.gz" | tar -zx --strip-components=1 -C "$TMP_DIR" + curl -sLk "https://github.com/BurntSushi/ripgrep/releases/download/${REL}/ripgrep-${REL}-x86_64-unknown-linux-musl.tar.gz" | tar -zx --strip-components=1 -C "$TMP_DIR" ((retry_count++)) done install -m 0755 "$TMP_DIR/rg" /usr/bin/ diff --git a/.assets/provision/install_yq.sh b/.assets/provision/install_yq.sh index ff60719f..3ed9b383 100755 --- a/.assets/provision/install_yq.sh +++ b/.assets/provision/install_yq.sh @@ -35,7 +35,7 @@ printf "\e[92minstalling \e[1m$APP\e[22m v$REL\e[0m\n" >&2 TMP_DIR=$(mktemp -dp "$PWD") retry_count=0 while [[ ! -f "$TMP_DIR/yq_linux_amd64" && $retry_count -lt 10 ]]; do - curl -Lsk "https://github.com/mikefarah/yq/releases/download/v${REL}/yq_linux_amd64.tar.gz" | tar -zx -C "$TMP_DIR" + curl -sLk "https://github.com/mikefarah/yq/releases/download/v${REL}/yq_linux_amd64.tar.gz" | tar -zx -C "$TMP_DIR" ((retry_count++)) done install -m 0755 "$TMP_DIR/yq_linux_amd64" /usr/local/bin/yq diff --git a/.assets/provision/setup_gnome.sh b/.assets/provision/setup_gnome.sh index ba13a8e0..437f73a0 100755 --- a/.assets/provision/setup_gnome.sh +++ b/.assets/provision/setup_gnome.sh @@ -30,7 +30,8 @@ esac # install dash-to-dock if $INSTALL_DASH; then GIT_SSL_NO_VERIFY=true git clone https://github.com/micheleg/dash-to-dock.git - make -C dash-to-dock install && rm -fr dash-to-dock + make -C dash-to-dock install + rm -fr dash-to-dock fi # button-layout gsettings set org.gnome.desktop.wm.preferences button-layout ":minimize,maximize,close" diff --git a/.assets/provision/setup_omp.sh b/.assets/provision/setup_omp.sh index 95ff3f0f..18f9bfb8 100755 --- a/.assets/provision/setup_omp.sh +++ b/.assets/provision/setup_omp.sh @@ -44,7 +44,7 @@ sudo -u $user mkdir -p $CFG_PATH if [ -f ".assets/config/omp_cfg/${theme}.omp.json" ]; then cp -f ".assets/config/omp_cfg/${theme}.omp.json" "$CFG_PATH" else - curl -fsSk -o "$CFG_PATH/${theme}.omp.json" "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/${theme}.omp.json" 2>/dev/null + curl -sSk -o "$CFG_PATH/${theme}.omp.json" "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/${theme}.omp.json" 2>/dev/null fi # *Copy oh-my-posh theme From ce2474d123d04e7f389d84671ee263faa027b288 Mon Sep 17 00:00:00 2001 From: Szymon Osiecki Date: Sat, 18 Nov 2023 14:12:39 +0100 Subject: [PATCH 4/7] refactor: eza add color-scale and git-repos params --- .assets/config/bash_cfg/aliases.sh | 2 +- .assets/config/pwsh_cfg/_aliases_linux.ps1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.assets/config/bash_cfg/aliases.sh b/.assets/config/bash_cfg/aliases.sh index c5dbcb66..cd0519b7 100644 --- a/.assets/config/bash_cfg/aliases.sh +++ b/.assets/config/bash_cfg/aliases.sh @@ -74,7 +74,7 @@ alias cd..='cd ../' alias cic='set completion-ignore-case On' alias cp='cp -iv' alias d='bm -d' -alias eza='eza -g --color=auto --time-style=long-iso --group-directories-first' +alias eza='eza -g --color=auto --time-style=long-iso --group-directories-first --color-scale=all --git-repos' alias gsi='sysinfo' alias l='eza -1' alias lsa='eza -a' diff --git a/.assets/config/pwsh_cfg/_aliases_linux.ps1 b/.assets/config/pwsh_cfg/_aliases_linux.ps1 index ad99ad16..9a35ce81 100644 --- a/.assets/config/pwsh_cfg/_aliases_linux.ps1 +++ b/.assets/config/pwsh_cfg/_aliases_linux.ps1 @@ -7,7 +7,7 @@ if ($env:DISTRO_FAMILY -eq 'alpine') { function ip { $input | & /usr/bin/env ip --color=auto @args } function ls { & /usr/bin/env ls -h --color=auto --group-directories-first --time-style=long-iso @args } } -function eza { & /usr/bin/env eza -g --color=auto --time-style=long-iso --group-directories-first @args } +function eza { & /usr/bin/env eza -g --color=auto --time-style=long-iso --group-directories-first --color-scale=all --git-repos @args } function l { eza -1 @args } function lsa { eza -a @args } function ll { eza -lah @args } From 004968a93ba88c469755090b78ee2dd0f175fa6c Mon Sep 17 00:00:00 2001 From: Szymon Osiecki Date: Sat, 18 Nov 2023 15:02:39 +0100 Subject: [PATCH 5/7] fix(ps): set PSGallery trusted --- .assets/provision/setup_profile_allusers.ps1 | 2 +- .assets/provision/setup_profile_user.ps1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.assets/provision/setup_profile_allusers.ps1 b/.assets/provision/setup_profile_allusers.ps1 index 7019cade..b0135467 100755 --- a/.assets/provision/setup_profile_allusers.ps1 +++ b/.assets/provision/setup_profile_allusers.ps1 @@ -103,7 +103,7 @@ process { if (-not (Get-PSResourceRepository -Name PSGallery).Trusted) { Write-Host 'setting PSGallery trusted...' - Set-PSResourceRepository -Name PSGallery -Trusted -ApiVersion v2 + Set-PSResourceRepository -Name PSGallery -Trusted } for ($i = 0; (Test-Path /usr/bin/git) -and -not (Get-Module posh-git -ListAvailable) -and $i -lt 5; $i++) { Write-Host 'installing posh-git...' diff --git a/.assets/provision/setup_profile_user.ps1 b/.assets/provision/setup_profile_user.ps1 index 6dd990f2..63ebf66b 100755 --- a/.assets/provision/setup_profile_user.ps1 +++ b/.assets/provision/setup_profile_user.ps1 @@ -19,7 +19,7 @@ if (-not (Test-Path $profileDir -PathType Container)) { if (Get-InstalledModule -Name Microsoft.PowerShell.PSResourceGet) { if (-not (Get-PSResourceRepository -Name PSGallery).Trusted) { Write-Host 'setting PSGallery trusted...' - Set-PSResourceRepository -Name PSGallery -Trusted -ApiVersion v2 + Set-PSResourceRepository -Name PSGallery -Trusted # update help, assuming this is the initial setup Write-Host 'updating help...' Update-Help From cb0bf0bfe14391289f423bcf5333283bcfcd1db7 Mon Sep 17 00:00:00 2001 From: Szymon Osiecki Date: Sat, 18 Nov 2023 18:23:23 +0100 Subject: [PATCH 6/7] fix(ps): PSResourceGet handling in PS 7.4.0 --- .assets/provision/setup_profile_allusers.ps1 | 21 +------------------- .assets/provision/setup_profile_user.ps1 | 4 ++-- 2 files changed, 3 insertions(+), 22 deletions(-) diff --git a/.assets/provision/setup_profile_allusers.ps1 b/.assets/provision/setup_profile_allusers.ps1 index b0135467..a9ecc428 100755 --- a/.assets/provision/setup_profile_allusers.ps1 +++ b/.assets/provision/setup_profile_allusers.ps1 @@ -80,27 +80,8 @@ process { if ((Get-PSRepository -Name PSGallery).InstallationPolicy -eq 'Untrusted') { Set-PSRepository -Name PSGallery -InstallationPolicy Trusted } - # TODO to be removed, uninstall PowerShellGet v3 - Get-InstalledModule -Name PowerShellGet -AllVersions -ErrorAction SilentlyContinue | Uninstall-Module - # install Microsoft.PowerShell.PSResourceGet - for ($i = 0; -not (Get-Module Microsoft.PowerShell.PSResourceGet -ListAvailable) -and $i -lt 5; $i++) { - Write-Host 'installing PSResourceGet...' - Install-Module Microsoft.PowerShell.PSResourceGet -Scope AllUsers - } # install/update modules - if (Get-InstalledModule -Name Microsoft.PowerShell.PSResourceGet -ErrorAction SilentlyContinue) { - # update Microsoft.PowerShell.PSResourceGet - try { - Update-Module Microsoft.PowerShell.PSResourceGet -Scope AllUsers -ErrorAction Stop - } catch { - Install-Module Microsoft.PowerShell.PSResourceGet -Scope AllUsers -Force -SkipPublisherCheck - } - # uninstall old versions - Get-InstalledModule -Name Microsoft.PowerShell.PSResourceGet -AllVersions ` - | Sort-Object -Property PublishedDate -Descending ` - | Select-Object -Skip 1 ` - | Uninstall-Module - + if (Get-Module -Name Microsoft.PowerShell.PSResourceGet -ListAvailable) { if (-not (Get-PSResourceRepository -Name PSGallery).Trusted) { Write-Host 'setting PSGallery trusted...' Set-PSResourceRepository -Name PSGallery -Trusted diff --git a/.assets/provision/setup_profile_user.ps1 b/.assets/provision/setup_profile_user.ps1 index 63ebf66b..1d992f98 100755 --- a/.assets/provision/setup_profile_user.ps1 +++ b/.assets/provision/setup_profile_user.ps1 @@ -16,13 +16,13 @@ if (-not (Test-Path $profileDir -PathType Container)) { New-Item $profileDir -ItemType Directory | Out-Null } # set up Microsoft.PowerShell.PSResourceGet and update installed modules -if (Get-InstalledModule -Name Microsoft.PowerShell.PSResourceGet) { +if (Get-Module -Name Microsoft.PowerShell.PSResourceGet -ListAvailable) { if (-not (Get-PSResourceRepository -Name PSGallery).Trusted) { Write-Host 'setting PSGallery trusted...' Set-PSResourceRepository -Name PSGallery -Trusted # update help, assuming this is the initial setup Write-Host 'updating help...' - Update-Help + Update-Help -UICulture en-US } # update existing modules if (Test-Path .assets/provision/update_psresources.ps1 -PathType Leaf) { From 33b50aedb6b04f10ea2b604b7ab1c88167366480 Mon Sep 17 00:00:00 2001 From: Szymon Osiecki Date: Sun, 19 Nov 2023 00:34:55 +0100 Subject: [PATCH 7/7] fix(sh): install - show curl progress bar --- .assets/provision/install_argorolloutscli.sh | 2 +- .assets/provision/install_bat.sh | 4 ++-- .assets/provision/install_etcdctl.sh | 2 +- .assets/provision/install_exa.sh | 2 +- .assets/provision/install_eza.sh | 2 +- .assets/provision/install_fastfetch.sh | 2 +- .assets/provision/install_fonts_cascadiacode.sh | 2 +- .assets/provision/install_fonts_nerd.sh | 2 +- .assets/provision/install_k9s.sh | 2 +- .assets/provision/install_kubectl-convert.sh | 2 +- .assets/provision/install_kubectl.sh | 2 +- .assets/provision/install_kubelogin.sh | 2 +- .assets/provision/install_kubeseal.sh | 2 +- .assets/provision/install_miniconda.sh | 2 +- .assets/provision/install_minikube.sh | 4 ++-- .assets/provision/install_omp.sh | 2 +- .assets/provision/install_pwsh.sh | 6 +++--- .assets/provision/install_ripgrep.sh | 2 +- .assets/provision/install_yq.sh | 2 +- .assets/provision/setup_omp.sh | 2 +- 20 files changed, 24 insertions(+), 24 deletions(-) diff --git a/.assets/provision/install_argorolloutscli.sh b/.assets/provision/install_argorolloutscli.sh index 7679e816..9b2142a7 100755 --- a/.assets/provision/install_argorolloutscli.sh +++ b/.assets/provision/install_argorolloutscli.sh @@ -35,7 +35,7 @@ printf "\e[92minstalling \e[1m$APP\e[22m v$REL\e[0m\n" >&2 TMP_DIR=$(mktemp -dp "$PWD") retry_count=0 while [[ ! -f "$TMP_DIR/$APP" && $retry_count -lt 10 ]]; do - curl -sLko "$TMP_DIR/$APP" "https://github.com/argoproj/argo-rollouts/releases/download/v${REL}/kubectl-argo-rollouts-linux-amd64" + curl -#Lko "$TMP_DIR/$APP" "https://github.com/argoproj/argo-rollouts/releases/download/v${REL}/kubectl-argo-rollouts-linux-amd64" ((retry_count++)) done install -m 0755 "$TMP_DIR/$APP" /usr/local/bin/kubectl-argo-rollouts diff --git a/.assets/provision/install_bat.sh b/.assets/provision/install_bat.sh index 1bd943c8..2941b01c 100755 --- a/.assets/provision/install_bat.sh +++ b/.assets/provision/install_bat.sh @@ -65,7 +65,7 @@ debian | ubuntu) TMP_DIR=$(mktemp -dp "$PWD") retry_count=0 while [[ ! -f "$TMP_DIR/$APP.deb" && $retry_count -lt 10 ]]; do - curl -sLko "$TMP_DIR/$APP.deb" "https://github.com/sharkdp/bat/releases/download/v${REL}/bat_${REL}_amd64.deb" + curl -#Lko "$TMP_DIR/$APP.deb" "https://github.com/sharkdp/bat/releases/download/v${REL}/bat_${REL}_amd64.deb" ((retry_count++)) done dpkg -i "$TMP_DIR/$APP.deb" >&2 2>/dev/null || binary=true @@ -84,7 +84,7 @@ if [ "$binary" = true ]; then TMP_DIR=$(mktemp -dp "$PWD") retry_count=0 while [[ ! -f "$TMP_DIR/bat" && $retry_count -lt 10 ]]; do - curl -sLk "https://github.com/sharkdp/bat/releases/download/v${REL}/bat-v${REL}-x86_64-unknown-linux-gnu.tar.gz" | tar -zx --strip-components=1 -C "$TMP_DIR" + curl -Lk "https://github.com/sharkdp/bat/releases/download/v${REL}/bat-v${REL}-x86_64-unknown-linux-gnu.tar.gz" | tar -zx --strip-components=1 -C "$TMP_DIR" ((retry_count++)) done install -m 0755 "$TMP_DIR/bat" /usr/bin/ diff --git a/.assets/provision/install_etcdctl.sh b/.assets/provision/install_etcdctl.sh index 182a63cc..71a4e56a 100755 --- a/.assets/provision/install_etcdctl.sh +++ b/.assets/provision/install_etcdctl.sh @@ -35,7 +35,7 @@ printf "\e[92minstalling \e[1m$APP\e[22m v$REL\e[0m\n" >&2 TMP_DIR=$(mktemp -dp "$PWD") retry_count=0 while [[ ! -f "$TMP_DIR/etcdctl" && $retry_count -lt 10 ]]; do - curl -sLk "https://github.com/etcd-io/etcd/releases/download/v${REL}/etcd-v${REL}-linux-amd64.tar.gz" | tar -zx --strip-components=1 --no-same-owner -C "$TMP_DIR" + curl -#Lk "https://github.com/etcd-io/etcd/releases/download/v${REL}/etcd-v${REL}-linux-amd64.tar.gz" | tar -zx --strip-components=1 --no-same-owner -C "$TMP_DIR" ((retry_count++)) done install -m 0755 "$TMP_DIR/etcdctl" /usr/local/bin/ diff --git a/.assets/provision/install_exa.sh b/.assets/provision/install_exa.sh index 00bb407f..700ef490 100755 --- a/.assets/provision/install_exa.sh +++ b/.assets/provision/install_exa.sh @@ -77,7 +77,7 @@ if [ "$binary" = true ]; then TMP_DIR=$(mktemp -dp "$PWD") retry_count=0 while [[ ! -f "$TMP_DIR/$APP.zip" && $retry_count -lt 10 ]]; do - curl -sLko "$TMP_DIR/$APP.zip" "https://github.com/ogham/exa/releases/download/v${REL}/exa-linux-x86_64-v${REL}.zip" + curl -#Lko "$TMP_DIR/$APP.zip" "https://github.com/ogham/exa/releases/download/v${REL}/exa-linux-x86_64-v${REL}.zip" ((retry_count++)) done unzip -q "$TMP_DIR/$APP.zip" -d "$TMP_DIR" diff --git a/.assets/provision/install_eza.sh b/.assets/provision/install_eza.sh index b7a1ce0b..c6c97c04 100755 --- a/.assets/provision/install_eza.sh +++ b/.assets/provision/install_eza.sh @@ -91,7 +91,7 @@ if [ "$binary" = true ]; then TMP_DIR=$(mktemp -dp "$PWD") retry_count=0 while [[ ! -f "$TMP_DIR/$APP.tar.gz" && $retry_count -lt 10 ]]; do - curl -sLko "$TMP_DIR/$APP.tar.gz" "https://github.com/eza-community/eza/releases/download/v${REL}/eza_x86_64-unknown-linux-${lib}.tar.gz" + curl -#Lko "$TMP_DIR/$APP.tar.gz" "https://github.com/eza-community/eza/releases/download/v${REL}/eza_x86_64-unknown-linux-${lib}.tar.gz" ((retry_count++)) done tar -zxf "$TMP_DIR/$APP.tar.gz" -C "$TMP_DIR" diff --git a/.assets/provision/install_fastfetch.sh b/.assets/provision/install_fastfetch.sh index 56ae3e3e..b1d5e244 100755 --- a/.assets/provision/install_fastfetch.sh +++ b/.assets/provision/install_fastfetch.sh @@ -72,7 +72,7 @@ debian | ubuntu) TMP_DIR=$(mktemp -dp "$PWD") retry_count=0 while [[ ! -f "$TMP_DIR/$APP.deb" && $retry_count -lt 10 ]]; do - curl -sLko "$TMP_DIR/$APP.deb" "https://github.com/fastfetch-cli/fastfetch/releases/download/${REL}/fastfetch-${REL}-Linux.deb" + curl -#Lko "$TMP_DIR/$APP.deb" "https://github.com/fastfetch-cli/fastfetch/releases/download/${REL}/fastfetch-${REL}-Linux.deb" ((retry_count++)) done dpkg -i "$TMP_DIR/$APP.deb" >&2 2>/dev/null diff --git a/.assets/provision/install_fonts_cascadiacode.sh b/.assets/provision/install_fonts_cascadiacode.sh index 50662274..0e9270dd 100755 --- a/.assets/provision/install_fonts_cascadiacode.sh +++ b/.assets/provision/install_fonts_cascadiacode.sh @@ -28,7 +28,7 @@ echo "Install CascadiaCode v$REL" >&2 TMP_DIR=$(mktemp -dp "$PWD") retry_count=0 while [[ ! -f "$TMP_DIR/CascadiaCode.zip" && $retry_count -lt 10 ]]; do - curl -sLko "$TMP_DIR/CascadiaCode.zip" "https://github.com/microsoft/cascadia-code/releases/download/v${REL}/CascadiaCode-${REL}.zip" + curl -#Lko "$TMP_DIR/CascadiaCode.zip" "https://github.com/microsoft/cascadia-code/releases/download/v${REL}/CascadiaCode-${REL}.zip" ((retry_count++)) done unzip -q "$TMP_DIR/CascadiaCode.zip" -d "$TMP_DIR" diff --git a/.assets/provision/install_fonts_nerd.sh b/.assets/provision/install_fonts_nerd.sh index 2ade4a68..051eb4aa 100755 --- a/.assets/provision/install_fonts_nerd.sh +++ b/.assets/provision/install_fonts_nerd.sh @@ -90,7 +90,7 @@ if [ -n "$1" ]; then TMP_DIR=$(mktemp -dp "$PWD") retry_count=0 while [[ ! -f "$TMP_DIR/$font.zip" && $retry_count -lt 10 ]]; do - curl -sLko "$TMP_DIR/$font.zip" "https://github.com/ryanoasis/nerd-fonts/releases/latest/download/${font}.zip" + curl -#Lko "$TMP_DIR/$font.zip" "https://github.com/ryanoasis/nerd-fonts/releases/latest/download/${font}.zip" ((retry_count++)) done unzip -q "$TMP_DIR/$font.zip" -d "$TMP_DIR" diff --git a/.assets/provision/install_k9s.sh b/.assets/provision/install_k9s.sh index a63c2a24..a12ac9da 100755 --- a/.assets/provision/install_k9s.sh +++ b/.assets/provision/install_k9s.sh @@ -35,7 +35,7 @@ printf "\e[92minstalling \e[1m$APP\e[22m v$REL\e[0m\n" >&2 TMP_DIR=$(mktemp -dp "$PWD") retry_count=0 while [[ ! -f "$TMP_DIR/k9s.tar.gz" && $retry_count -lt 10 ]]; do - curl -sLko "$TMP_DIR/k9s.tar.gz" "https://github.com/derailed/k9s/releases/download/v${REL}/k9s_Linux_amd64.tar.gz" + curl -#Lko "$TMP_DIR/k9s.tar.gz" "https://github.com/derailed/k9s/releases/download/v${REL}/k9s_Linux_amd64.tar.gz" ((retry_count++)) done tar -zxvf "$TMP_DIR/k9s.tar.gz" -C "$TMP_DIR" diff --git a/.assets/provision/install_kubectl-convert.sh b/.assets/provision/install_kubectl-convert.sh index d9fd63ac..7d65219e 100755 --- a/.assets/provision/install_kubectl-convert.sh +++ b/.assets/provision/install_kubectl-convert.sh @@ -12,7 +12,7 @@ APP='kubectl-convert' TMP_DIR=$(mktemp -dp "$PWD") retry_count=0 while [[ ! -f "$TMP_DIR/$APP" && $retry_count -lt 10 ]]; do - curl -sLko "$TMP_DIR/$APP" "https://dl.k8s.io/release/$(curl -sLk https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl-convert" + curl -#Lko "$TMP_DIR/$APP" "https://dl.k8s.io/release/$(curl -sLk https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl-convert" ((retry_count++)) done # install diff --git a/.assets/provision/install_kubectl.sh b/.assets/provision/install_kubectl.sh index c2396d94..21cfbd5c 100755 --- a/.assets/provision/install_kubectl.sh +++ b/.assets/provision/install_kubectl.sh @@ -69,7 +69,7 @@ if [ "$binary" = true ]; then TMP_DIR=$(mktemp -dp "$PWD") retry_count=0 while [[ ! -f "$TMP_DIR/$APP" && $retry_count -lt 10 ]]; do - curl -sLko "$TMP_DIR/$APP" "https://dl.k8s.io/release/$(curl -sLk https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" + curl -#Lko "$TMP_DIR/$APP" "https://dl.k8s.io/release/$(curl -sLk https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" ((retry_count++)) done # install diff --git a/.assets/provision/install_kubelogin.sh b/.assets/provision/install_kubelogin.sh index f59d3212..486fc410 100755 --- a/.assets/provision/install_kubelogin.sh +++ b/.assets/provision/install_kubelogin.sh @@ -35,7 +35,7 @@ printf "\e[92minstalling \e[1m$APP\e[22m v$REL\e[0m\n" >&2 TMP_DIR=$(mktemp -dp "$PWD") retry_count=0 while [[ ! -f "$TMP_DIR/$APP.zip" && $retry_count -lt 10 ]]; do - curl -sLko "$TMP_DIR/$APP.zip" "https://github.com/Azure/kubelogin/releases/download/v${REL}/kubelogin-linux-amd64.zip" + curl -#Lko "$TMP_DIR/$APP.zip" "https://github.com/Azure/kubelogin/releases/download/v${REL}/kubelogin-linux-amd64.zip" ((retry_count++)) done unzip -q "$TMP_DIR/$APP.zip" -d "$TMP_DIR" diff --git a/.assets/provision/install_kubeseal.sh b/.assets/provision/install_kubeseal.sh index 804a5cd1..11af40e0 100755 --- a/.assets/provision/install_kubeseal.sh +++ b/.assets/provision/install_kubeseal.sh @@ -35,7 +35,7 @@ printf "\e[92minstalling \e[1m$APP\e[22m v$REL\e[0m\n" >&2 TMP_DIR=$(mktemp -dp "$PWD") retry_count=0 while [[ ! -f "$TMP_DIR/$APP" && $retry_count -lt 10 ]]; do - curl -sLk "https://github.com/bitnami-labs/sealed-secrets/releases/download/v${REL}/kubeseal-${REL}-linux-amd64.tar.gz" | tar -zx -C "$TMP_DIR" + curl -#Lk "https://github.com/bitnami-labs/sealed-secrets/releases/download/v${REL}/kubeseal-${REL}-linux-amd64.tar.gz" | tar -zx -C "$TMP_DIR" ((retry_count++)) done install -m 0755 "$TMP_DIR/$APP" /usr/local/bin/ diff --git a/.assets/provision/install_miniconda.sh b/.assets/provision/install_miniconda.sh index b7682e00..3a8081b1 100755 --- a/.assets/provision/install_miniconda.sh +++ b/.assets/provision/install_miniconda.sh @@ -45,7 +45,7 @@ else TMP_DIR=$(mktemp -dp "$PWD") retry_count=0 while [[ ! -f "$TMP_DIR/miniconda.sh" && $retry_count -lt 10 ]]; do - curl -sLko "$TMP_DIR/miniconda.sh" https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh + curl -#Lko "$TMP_DIR/miniconda.sh" https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh ((retry_count++)) done bash $TMP_DIR/miniconda.sh -b -p "$HOME/miniconda3" >/dev/null diff --git a/.assets/provision/install_minikube.sh b/.assets/provision/install_minikube.sh index c981ca00..5dffdecb 100755 --- a/.assets/provision/install_minikube.sh +++ b/.assets/provision/install_minikube.sh @@ -56,7 +56,7 @@ debian | ubuntu) TMP_DIR=$(mktemp -dp "$PWD") retry_count=0 while [[ ! -f "$TMP_DIR/$APP.deb" && $retry_count -lt 10 ]]; do - curl -sLko "$TMP_DIR/$APP.deb" "https://storage.googleapis.com/minikube/releases/latest/minikube_latest_amd64.deb" + curl -#Lko "$TMP_DIR/$APP.deb" "https://storage.googleapis.com/minikube/releases/latest/minikube_latest_amd64.deb" ((retry_count++)) done dpkg -i "$TMP_DIR/$APP.deb" >&2 2>/dev/null || binary=true @@ -75,7 +75,7 @@ if [ "$binary" = true ]; then TMP_DIR=$(mktemp -dp "$PWD") retry_count=0 while [[ ! -f "$TMP_DIR/$APP" && $retry_count -lt 10 ]]; do - curl -sLko "$TMP_DIR/$APP" "https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64" + curl -#Lko "$TMP_DIR/$APP" "https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64" ((retry_count++)) done install -m 0755 "$TMP_DIR/$APP" /usr/local/bin/minikube diff --git a/.assets/provision/install_omp.sh b/.assets/provision/install_omp.sh index 40fa350c..e7e95f17 100755 --- a/.assets/provision/install_omp.sh +++ b/.assets/provision/install_omp.sh @@ -35,7 +35,7 @@ printf "\e[92minstalling \e[1m$APP\e[22m v$REL\e[0m\n" >&2 TMP_DIR=$(mktemp -dp "$PWD") retry_count=0 while [[ ! -f "$TMP_DIR/$APP" && $retry_count -lt 10 ]]; do - curl -sLko "$TMP_DIR/$APP" "https://github.com/JanDeDobbeleer/oh-my-posh/releases/download/v${REL}/posh-linux-amd64" + curl -#Lko "$TMP_DIR/$APP" "https://github.com/JanDeDobbeleer/oh-my-posh/releases/download/v${REL}/posh-linux-amd64" ((retry_count++)) done install -m 0755 "$TMP_DIR/$APP" /usr/bin/oh-my-posh diff --git a/.assets/provision/install_pwsh.sh b/.assets/provision/install_pwsh.sh index d7c1057d..1ac72128 100755 --- a/.assets/provision/install_pwsh.sh +++ b/.assets/provision/install_pwsh.sh @@ -42,7 +42,7 @@ alpine) TMP_DIR=$(mktemp -dp "$PWD") retry_count=0 while [[ ! -f "$TMP_DIR/$APP.tar.gz" && $retry_count -lt 10 ]]; do - curl -sLko "$TMP_DIR/$APP.tar.gz" "https://github.com/PowerShell/PowerShell/releases/download/v${REL}/powershell-${REL}-linux-alpine-x64.tar.gz" + curl -#Lko "$TMP_DIR/$APP.tar.gz" "https://github.com/PowerShell/PowerShell/releases/download/v${REL}/powershell-${REL}-linux-alpine-x64.tar.gz" ((retry_count++)) done mkdir -p /opt/microsoft/powershell/7 && tar -zxf "$TMP_DIR/$APP.tar.gz" -C /opt/microsoft/powershell/7 @@ -74,7 +74,7 @@ debian | ubuntu) TMP_DIR=$(mktemp -dp "$PWD") retry_count=0 while [[ ! -f "$TMP_DIR/$APP.deb" && $retry_count -lt 10 ]]; do - curl -sLko "$TMP_DIR/$APP.deb" "https://github.com/PowerShell/PowerShell/releases/download/v${REL}/powershell_${REL}-1.deb_amd64.deb" + curl -#Lko "$TMP_DIR/$APP.deb" "https://github.com/PowerShell/PowerShell/releases/download/v${REL}/powershell_${REL}-1.deb_amd64.deb" ((retry_count++)) done dpkg -i "$TMP_DIR/$APP.deb" >&2 2>/dev/null || binary=true @@ -91,7 +91,7 @@ if [ "$binary" = true ]; then TMP_DIR=$(mktemp -dp "$PWD") retry_count=0 while [[ ! -f "$TMP_DIR/$APP.tar.gz" && $retry_count -lt 10 ]]; do - curl -sLko "$TMP_DIR/$APP.tar.gz" "https://github.com/PowerShell/PowerShell/releases/download/v${REL}/powershell-${REL}-linux-x64.tar.gz" + curl -#Lko "$TMP_DIR/$APP.tar.gz" "https://github.com/PowerShell/PowerShell/releases/download/v${REL}/powershell-${REL}-linux-x64.tar.gz" ((retry_count++)) done mkdir -p /opt/microsoft/powershell/7 diff --git a/.assets/provision/install_ripgrep.sh b/.assets/provision/install_ripgrep.sh index 9f95871a..0661d5a6 100755 --- a/.assets/provision/install_ripgrep.sh +++ b/.assets/provision/install_ripgrep.sh @@ -77,7 +77,7 @@ if [ "$binary" = true ]; then TMP_DIR=$(mktemp -dp "$PWD") retry_count=0 while [[ ! -f "$TMP_DIR/rg" && $retry_count -lt 10 ]]; do - curl -sLk "https://github.com/BurntSushi/ripgrep/releases/download/${REL}/ripgrep-${REL}-x86_64-unknown-linux-musl.tar.gz" | tar -zx --strip-components=1 -C "$TMP_DIR" + curl -#Lk "https://github.com/BurntSushi/ripgrep/releases/download/${REL}/ripgrep-${REL}-x86_64-unknown-linux-musl.tar.gz" | tar -zx --strip-components=1 -C "$TMP_DIR" ((retry_count++)) done install -m 0755 "$TMP_DIR/rg" /usr/bin/ diff --git a/.assets/provision/install_yq.sh b/.assets/provision/install_yq.sh index 3ed9b383..75306c5b 100755 --- a/.assets/provision/install_yq.sh +++ b/.assets/provision/install_yq.sh @@ -35,7 +35,7 @@ printf "\e[92minstalling \e[1m$APP\e[22m v$REL\e[0m\n" >&2 TMP_DIR=$(mktemp -dp "$PWD") retry_count=0 while [[ ! -f "$TMP_DIR/yq_linux_amd64" && $retry_count -lt 10 ]]; do - curl -sLk "https://github.com/mikefarah/yq/releases/download/v${REL}/yq_linux_amd64.tar.gz" | tar -zx -C "$TMP_DIR" + curl -#Lk "https://github.com/mikefarah/yq/releases/download/v${REL}/yq_linux_amd64.tar.gz" | tar -zx -C "$TMP_DIR" ((retry_count++)) done install -m 0755 "$TMP_DIR/yq_linux_amd64" /usr/local/bin/yq diff --git a/.assets/provision/setup_omp.sh b/.assets/provision/setup_omp.sh index 18f9bfb8..95ff3f0f 100755 --- a/.assets/provision/setup_omp.sh +++ b/.assets/provision/setup_omp.sh @@ -44,7 +44,7 @@ sudo -u $user mkdir -p $CFG_PATH if [ -f ".assets/config/omp_cfg/${theme}.omp.json" ]; then cp -f ".assets/config/omp_cfg/${theme}.omp.json" "$CFG_PATH" else - curl -sSk -o "$CFG_PATH/${theme}.omp.json" "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/${theme}.omp.json" 2>/dev/null + curl -fsSk -o "$CFG_PATH/${theme}.omp.json" "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/${theme}.omp.json" 2>/dev/null fi # *Copy oh-my-posh theme