-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathmy-functions.sh
51 lines (43 loc) · 1.57 KB
/
my-functions.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
#!/usr/bin/env bash
# -- check_script_input_parameter --
# $1: input parameter
function check_script_input_parameter() {
if [ "$1" != "all" ] &&
[ "$1" != "string-de-serialization" ] &&
[ "$1" != "string-producer-service" ] &&
[ "$1" != "string-consumer-service" ] &&
[ "$1" != "json-de-serialization" ] &&
[ "$1" != "json-producer-service" ] &&
[ "$1" != "json-consumer-service" ] &&
[ "$1" != "avro-de-serialization" ] &&
[ "$1" != "avro-producer-service" ] &&
[ "$1" != "avro-consumer-service" ] &&
[ "$1" != "avro-2-de-serialization" ] &&
[ "$1" != "avro-2-producer-service" ] &&
[ "$1" != "avro-2-consumer-service" ] &&
[ "$1" != "avro-3-de-serialization" ] &&
[ "$1" != "avro-3-producer-service" ] &&
[ "$1" != "avro-3-consumer-service" ];
then
printf "Invalid application name or sample provided!"
printf "\nValid Parameters:"
printf "\n\tall"
printf "\n\tstring-de-serialization"
printf "\n\t\tstring-producer-service"
printf "\n\t\tstring-consumer-service"
printf "\n\tjson-de-serialization"
printf "\n\t\tjson-producer-service"
printf "\n\t\tjson-consumer-service"
printf "\n\tavro-de-serialization"
printf "\n\t\tavro-producer-service"
printf "\n\t\tavro-consumer-service"
printf "\n\tavro-2-de-serialization"
printf "\n\t\tavro-2-producer-service"
printf "\n\t\tavro-2-consumer-service"
printf "\n\tavro-3-de-serialization"
printf "\n\t\tavro-3-producer-service"
printf "\n\t\tavro-3-consumer-service"
printf "\n"
exit 1
fi
}