Skip to content

Commit

Permalink
Merge pull request #143 from szymonos/dev
Browse files Browse the repository at this point in the history
Merge dev to main
  • Loading branch information
szymonos authored Nov 19, 2023
2 parents 066a271 + 33b50ae commit 9e3a28b
Show file tree
Hide file tree
Showing 33 changed files with 117 additions and 113 deletions.
2 changes: 1 addition & 1 deletion .assets/config/bash_cfg/aliases.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
Empty file modified .assets/config/bash_cfg/functions.sh
100755 → 100644
Empty file.
2 changes: 1 addition & 1 deletion .assets/config/pwsh_cfg/_aliases_linux.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
10 changes: 6 additions & 4 deletions .assets/provision/install_argorolloutscli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 -#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 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"
2 changes: 1 addition & 1 deletion .assets/provision/install_base.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
;;
Expand Down
12 changes: 7 additions & 5 deletions .assets/provision/install_bat.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 -#Lko "$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
Expand All @@ -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 -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_brew.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .assets/provision/install_edge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions .assets/provision/install_etcdctl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 -#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
6 changes: 3 additions & 3 deletions .assets/provision/install_exa.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 -#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/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/"
Expand Down
6 changes: 3 additions & 3 deletions .assets/provision/install_eza.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 -#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/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
9 changes: 6 additions & 3 deletions .assets/provision/install_fastfetch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 -#Lko "$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
Expand Down
10 changes: 5 additions & 5 deletions .assets/provision/install_fonts_cascadiacode.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -20,15 +19,16 @@ 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

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 -#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
4 changes: 2 additions & 2 deletions .assets/provision/install_fonts_nerd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 -#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_gh.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .assets/provision/install_helm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .assets/provision/install_k3d.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions .assets/provision/install_k9s.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 -#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.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
Expand Down
8 changes: 5 additions & 3 deletions .assets/provision/install_kubectl-convert.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 -#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
install -m 0755 kubectl-convert /usr/bin/ && rm -f kubectl-convert
install -m 0755 "$TMP_DIR/$APP" /usr/bin/
rm -fr "$TMP_DIR"
12 changes: 7 additions & 5 deletions .assets/provision/install_kubectl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ 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
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
Expand Down Expand Up @@ -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 -#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
install -m 0755 kubectl /usr/bin/ && rm -f kubectl
install -m 0755 "$TMP_DIR/$APP" /usr/bin/
rm -fr "$TMP_DIR"
fi
8 changes: 4 additions & 4 deletions .assets/provision/install_kubelogin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 -#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/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"
8 changes: 4 additions & 4 deletions .assets/provision/install_kubeseal.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 -#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/kubeseal" /usr/local/bin/
install -m 0755 "$TMP_DIR/$APP" /usr/local/bin/
rm -fr "$TMP_DIR"
3 changes: 2 additions & 1 deletion .assets/provision/install_kustomize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 5 additions & 3 deletions .assets/provision/install_miniconda.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 -#Lko "$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
Expand Down
Loading

0 comments on commit 9e3a28b

Please sign in to comment.