Skip to content

Commit

Permalink
fix(sh): install - show curl progress bar
Browse files Browse the repository at this point in the history
  • Loading branch information
szymonos committed Nov 18, 2023
1 parent cb0bf0b commit 33b50ae
Show file tree
Hide file tree
Showing 20 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .assets/provision/install_argorolloutscli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .assets/provision/install_bat.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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/
Expand Down
2 changes: 1 addition & 1 deletion .assets/provision/install_etcdctl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down
2 changes: 1 addition & 1 deletion .assets/provision/install_exa.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion .assets/provision/install_eza.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion .assets/provision/install_fastfetch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .assets/provision/install_fonts_cascadiacode.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion .assets/provision/install_fonts_nerd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion .assets/provision/install_k9s.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion .assets/provision/install_kubectl-convert.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .assets/provision/install_kubectl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .assets/provision/install_kubelogin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion .assets/provision/install_kubeseal.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down
2 changes: 1 addition & 1 deletion .assets/provision/install_miniconda.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .assets/provision/install_minikube.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .assets/provision/install_omp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions .assets/provision/install_pwsh.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .assets/provision/install_ripgrep.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down
2 changes: 1 addition & 1 deletion .assets/provision/install_yq.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .assets/provision/setup_omp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 33b50ae

Please sign in to comment.