-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathparameterstest.sh
115 lines (101 loc) · 1.83 KB
/
parameterstest.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
#!/bin/bash
# BUMP 1
echo "Hello!"
INT=
DATE=
FLOAT=
BOOLEAN=
STRINGPATTERN=
STRINGENUMERATION=
INPUTS=
OUTPUTSTXT=
while [[ $# -gt 0 ]]
do
case "$1" in
--stringpattern)
STRINGPATTERN="$2"
shift 2
;;
--stringenumeration)
STRINGENUMERATION="$2"
shift 2
;;
--int)
INT="$2"
shift 2
;;
--date)
DATE="$2"
shift 2
;;
--float)
FLOAT="$2"
shift 2
;;
--boolean)
BOOLEAN="2"
shift 2
;;
--required)
REQUIRED="$2"
shift 2
;;
--inputs)
INPUTS="$2"
shift 2
;;
--outputs.txt)
OUTPUTSTXT="$2"
shift 2
;;
*)
shift 2
;;
esac
done
if [ -z "$boolean" ]
then
echo "I received no value for boolean."
else
echo "I received the value for boolean: $boolean"
fi
if [ -z "$date" ]
then
echo "I received no value for date."
else
echo "I received the value for date: $date"
fi
if [ -z "$float" ]
then
echo "I received no value for float."
else
echo "I received the value for float: $float"
fi
if [ -z "$int" ]
then
echo "I received no value for int."
else
echo "I received the value for int: $int"
fi
if [ -z "$stringpattern" ]
then
echo "I received no value for stringpattern."
else
echo "I received the value for stringpattern: $stringpattern"
fi
if [ -z "$stringenumeration" ]
then
echo "I received no value for stringenumeration."
else
echo "I received the value for stringenumeration: $stringenumeration"
fi
if [ -z "$required" ]
then
echo "I received no value for required."
else
echo "I received the value for required: $required"
fi
curl -XGET -s -o inputs.txt "$INPUTS" 2>/dev/null
curl -XPUT -q "$OUTPUTSTXT" --data-binary @inputs.txt
echo "I have copied the inputs to the outputs."
echo "Goodbye!"