Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Acme Downloader
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Geant DevOps
Acme Downloader
Commits
3fafd559
Unverified
Commit
3fafd559
authored
3 years ago
by
Max Adamo
Browse files
Options
Downloads
Patches
Plain Diff
add version paramter again
parent
0392862f
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
acme-downloader.sh
+12
-3
12 additions, 3 deletions
acme-downloader.sh
with
12 additions
and
3 deletions
acme-downloader.sh
+
12
−
3
View file @
3fafd559
...
@@ -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"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment