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
No related branches found
No related tags found
No related merge requests found
......@@ -100,7 +100,7 @@ usage() {
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"
while true; do
......@@ -157,6 +157,9 @@ while true; do
--check-version)
CHECK='CHECK'
;;
--version)
PROG_VERSION='PROG_VERSION'
;;
--)
shift
break
......@@ -165,9 +168,14 @@ while true; do
shift
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
curl $SCRIPT_URL -o $0
......@@ -186,6 +194,7 @@ if [[ -z $REDIS_TOKEN ]] || [[ -z $VAULT_TOKEN ]] || [[ -z $CERT_NAME ]] || [[ -
usage
fi
TYPE=$(echo $TYPE | tr '[:lower:]' '[:upper:]')
[[ -z $TYPE ]] && TYPE="EV" # let's default to EV type
if [[ $TYPE != "EV" ]] && [[ $TYPE != "OV" ]]; then
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