commit by to_remotes 2023-10-10 14:23:48 +0200 from vmdevac
parent
2f57784dd5
commit
c69d9dda69
|
|
@ -1,3 +1,3 @@
|
||||||
**usage**
|
**usage**
|
||||||
|
|
||||||
zsh <(curl -sk https://git.service.wiseadvice.eu/wiseadvice_public_repos/wa_public_init_repo/raw/branch/main/init.sh)
|
bash <(curl -sk https://git.service.wiseadvice.eu/wiseadvice_public_repos/wa_public_init_repo/raw/branch/main/init.sh)
|
||||||
11
init.sh
11
init.sh
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/zsh
|
#!/bin/bash
|
||||||
WA_REPO=$HOME/wa_repos
|
WA_REPO=$HOME/wa_repos
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -28,7 +28,7 @@ function choose_from_menu() {
|
||||||
fi
|
fi
|
||||||
index=$(( $index + 1 ))
|
index=$(( $index + 1 ))
|
||||||
done
|
done
|
||||||
read -s -n3 key # wait for user to key in arrows or ENTER
|
read -s key # wait for user to key in arrows or ENTER
|
||||||
if [[ $key == $esc[A ]] # up arrow
|
if [[ $key == $esc[A ]] # up arrow
|
||||||
then cur=$(( $cur - 1 ))
|
then cur=$(( $cur - 1 ))
|
||||||
[ "$cur" -lt 0 ] && cur=0
|
[ "$cur" -lt 0 ] && cur=0
|
||||||
|
|
@ -43,6 +43,7 @@ function choose_from_menu() {
|
||||||
# export the selection to the requested output variable
|
# export the selection to the requested output variable
|
||||||
printf -v $outvar "${options[$cur]}"
|
printf -v $outvar "${options[$cur]}"
|
||||||
}
|
}
|
||||||
|
|
||||||
function clone_repo_with_retry(){
|
function clone_repo_with_retry(){
|
||||||
REPO_NAME=$1
|
REPO_NAME=$1
|
||||||
echo "starting to pull into $(pwd)"
|
echo "starting to pull into $(pwd)"
|
||||||
|
|
@ -194,17 +195,17 @@ selections=(
|
||||||
"Join Worker"
|
"Join Worker"
|
||||||
"Stop Setup"
|
"Stop Setup"
|
||||||
)
|
)
|
||||||
|
|
||||||
choose_from_menu "Please make a choice:" selected_choice "${selections[@]}"
|
choose_from_menu "Please make a choice:" selected_choice "${selections[@]}"
|
||||||
|
|
||||||
|
|
||||||
if [ "$selected_choice" = "Init Master" ]; then
|
if [ "$selected_choice" = "Init Master" ]; then
|
||||||
echo "<=><=><=><=><=><=><=><=><=><=><=><=><=><=><=><=>"
|
echo "<=><=><=><=><=><=><=><=><=><=><=><=><=><=><=><=>"
|
||||||
echo "initializing K8s Master Set-Up"
|
echo "initializing K8s Master Set-Up"
|
||||||
source $WA_REPO/shared_resources_k8s/k8s/init_master.sh
|
zsh $WA_REPO/shared_resources_k8s/k8s/init_master.sh
|
||||||
else if [ "$selected_choice" = "Join Worker" ]; then
|
else if [ "$selected_choice" = "Join Worker" ]; then
|
||||||
echo "<=><=><=><=><=><=><=><=><=><=><=><=><=><=><=><=>"
|
echo "<=><=><=><=><=><=><=><=><=><=><=><=><=><=><=><=>"
|
||||||
echo "initializing K8s Master Set-Up"
|
echo "initializing K8s Master Set-Up"
|
||||||
source $WA_REPO/shared_resources_k8s/k8s/init_master.sh
|
zsh $WA_REPO/shared_resources_k8s/k8s/init_master.sh
|
||||||
else
|
else
|
||||||
echo "Aborting"
|
echo "Aborting"
|
||||||
exit 0
|
exit 0
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue