Verified Commit 19ae39bf authored by Laurent Heirendt's avatar Laurent Heirendt
Browse files

add draft of contribute shell script

parent 4d46c6f8
#!/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"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment