generated from arafkarsh/ms-springboot-324-java-22-jakarta-ee-10
-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathgetServiceName
executable file
·34 lines (34 loc) · 1.01 KB
/
getServiceName
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
#!/bin/sh
# -------------------------------------------------------------------------------------------
# @author: Araf Karsh Hamid
# -------------------------------------------------------------------------------------------
SRC_BASE=${PWD}
orgName=1
serviceName=2
apiName=3
containerName=4
param=$1
if [ -z "$param" ]
then
grep '^service.name=' $SRC_BASE/src/main/resources/app.props.tmpl | cut -d "=" -f 2
exit
fi
if [ $param == $orgName ]
then
grep '^service.org=' $SRC_BASE/src/main/resources/app.props.tmpl | cut -d "=" -f 2
exit
elif [ $param == $serviceName ]
then
grep '^service.name=' $SRC_BASE/src/main/resources/app.props.tmpl | cut -d "=" -f 2
exit
elif [ $param == $apiName ]
then
grep '^service.api.name=' $SRC_BASE/src/main/resources/app.props.tmpl | cut -d "=" -f 2
exit
elif [ $param == $containerName ]
then
grep '^service.container=' $SRC_BASE/src/main/resources/app.props.tmpl | cut -d "=" -f 2
exit
fi
grep '^service.api.name=' $SRC_BASE/src/main/resources/app.props.tmpl | cut -d "=" -f 2
exit