Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Nene Barry
markdown
Commits
19ae39bf
Verified
Commit
19ae39bf
authored
Nov 04, 2019
by
Laurent Heirendt
✈
Browse files
add draft of contribute shell script
parent
4d46c6f8
Changes
1
Hide whitespace changes
Inline
Side-by-side
contribute.sh
0 → 100755
View file @
19ae39bf
#!/bin/bash
helpFunction
()
{
echo
""
echo
"Usage:
$0
-a parameterA -b parameterB"
echo
-e
"
\t
-a Description of what is parameterA"
echo
-e
"
\t
-b Description of what is parameterB"
exit
1
# Exit script after printing help
}
while
getopts
"a:b:"
opt
do
case
"
$opt
"
in
a
)
parameterA
=
"
$OPTARG
"
;;
b
)
parameterB
=
"
$OPTARG
"
;;
?
)
helpFunction
;;
# Print helpFunction in case parameter is non-existent
esac
done
# Print helpFunction in case parameters are empty
if
[
-z
"
$parameterA
"
]
||
[
-z
"
$parameterB
"
]
then
echo
"Some or all of the parameters are empty"
;
helpFunction
fi
# launch the docker file
cmd
=
"python contribute.py --date=
\"
$parameterA
\"
--name=
\"
$parameterB
\"
"
docker run
-p
9000:9000
-it
-v
$(
pwd
)
/:/presentation f2df533bdacc /bin/bash
-c
"
$cmd
"
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment