Skip to content

Commit

Permalink
update: user msgs (#87)
Browse files Browse the repository at this point in the history
  • Loading branch information
codekow authored Jun 4, 2024
1 parent be955cb commit 645ecac
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 5 deletions.
13 changes: 11 additions & 2 deletions scripts/automate_operators.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
#!/bin/bash
# set -x

# shellcheck disable=SC2034

RED='\033[1;31m'
BLUE='\033[1;36m'
PURPLE='\033[1;35m'
ORANGE='\033[0;33m'
NC='\033[0m' # No Color

check_shell(){
[[ "${0}" =~ "bash" ]] && return
echo "Please verify you are running in bash shell"
[ -n "$BASH_VERSION" ] && return
echo -e "${ORANGE}WARNING: These scripts are ONLY tested in a bash shell${NC}"
sleep "${SLEEP_SECONDS:-8}"
}

check_shell
Expand Down
10 changes: 9 additions & 1 deletion scripts/bootstrap.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
#!/bin/bash
# set -e

# shellcheck disable=SC2034

# 8 seconds is usually enough time for the average user to realize they foobar
export SLEEP_SECONDS=8

################# standard init #################

RED='\033[1;31m'
BLUE='\033[1;36m'
PURPLE='\033[1;35m'
ORANGE='\033[0;33m'
NC='\033[0m' # No Color

check_shell(){
[ -n "$BASH_VERSION" ] && return
echo "Please verify you are running in bash shell"
echo -e "${ORANGE}WARNING: These scripts are ONLY tested in a bash shell${NC}"
sleep "${SLEEP_SECONDS:-8}"
}

Expand Down
10 changes: 8 additions & 2 deletions scripts/functions.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
#!/bin/bash
# shellcheck disable=SC1091
# shellcheck disable=SC1091,SC2034

RED='\033[1;31m'
BLUE='\033[1;36m'
PURPLE='\033[1;35m'
ORANGE='\033[0;33m'
NC='\033[0m' # No Color

check_shell(){
[ -n "$BASH_VERSION" ] && return
echo "Please verify you are running in bash shell"
echo -e "${ORANGE}WARNING: These scripts are ONLY tested in a bash shell${NC}"
sleep "${SLEEP_SECONDS:-8}"
}

Expand Down
11 changes: 11 additions & 0 deletions scripts/library/common.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
#!/bin/bash

# shellcheck disable=SC2034
RED='\033[1;31m'
BLUE='\033[1;36m'
PURPLE='\033[1;35m'
ORANGE='\033[0;33m'
NC='\033[0m' # No Color

# echo -e "${BLUE}INFO:${NC}
# echo -e "${RED}ERROR:${NC}
# echo -e "${ORANGE}WARNING:${NC}

# https://docs.openshift.com/container-platform/4.12/backup_and_restore/application_backup_and_restore/troubleshooting.html#velero-obtaining-by-accessing-binary_oadp-troubleshooting
alias velero='oc -n openshift-adp exec deployment/velero -c velero -it -- ./velero'

Expand Down

0 comments on commit 645ecac

Please sign in to comment.