Skip to content
Snippets Groups Projects
Unverified Commit 3fafd559 authored by Max Adamo's avatar Max Adamo
Browse files

add version paramter again

parent 0392862f
Branches
Tags
No related merge requests found
...@@ -100,7 +100,7 @@ usage() { ...@@ -100,7 +100,7 @@ usage() {
clean_up 2 clean_up 2
} }
OPTS=$(getopt -o "h" --longoptions "help,redis-token:,vault-token:,cert-name:,team-name:,days:,type:,cert-destination:,fullchain-destination:,key-destination:,ca-destination:,check-version,update,wildcard" -- "$@") OPTS=$(getopt -o "h" --longoptions "help,redis-token:,vault-token:,cert-name:,team-name:,days:,type:,cert-destination:,fullchain-destination:,key-destination:,ca-destination:,check-version,update,version,wildcard" -- "$@")
eval set -- "$OPTS" eval set -- "$OPTS"
while true; do while true; do
...@@ -157,6 +157,9 @@ while true; do ...@@ -157,6 +157,9 @@ while true; do
--check-version) --check-version)
CHECK='CHECK' CHECK='CHECK'
;; ;;
--version)
PROG_VERSION='PROG_VERSION'
;;
--) --)
shift shift
break break
...@@ -165,9 +168,14 @@ while true; do ...@@ -165,9 +168,14 @@ while true; do
shift shift
done done
TYPE=$(echo $TYPE | tr '[:lower:]' '[:upper:]') # print version buildtime and say goodbye
if [[ -n $PROG_VERSION ]]; then
echo "$(basename $0) version $VERSION built on ${BUILDTIME}"
clean_up 0
fi
#check_version $0 # check if we are using the latest version
check_version
if [[ -n $UPDATE ]]; then if [[ -n $UPDATE ]]; then
curl $SCRIPT_URL -o $0 curl $SCRIPT_URL -o $0
...@@ -186,6 +194,7 @@ if [[ -z $REDIS_TOKEN ]] || [[ -z $VAULT_TOKEN ]] || [[ -z $CERT_NAME ]] || [[ - ...@@ -186,6 +194,7 @@ if [[ -z $REDIS_TOKEN ]] || [[ -z $VAULT_TOKEN ]] || [[ -z $CERT_NAME ]] || [[ -
usage usage
fi fi
TYPE=$(echo $TYPE | tr '[:lower:]' '[:upper:]')
[[ -z $TYPE ]] && TYPE="EV" # let's default to EV type [[ -z $TYPE ]] && TYPE="EV" # let's default to EV type
if [[ $TYPE != "EV" ]] && [[ $TYPE != "OV" ]]; then if [[ $TYPE != "EV" ]] && [[ $TYPE != "OV" ]]; then
echo "type must be either EV, ev, OV, ov" echo "type must be either EV, ev, OV, ov"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment