-
Notifications
You must be signed in to change notification settings - Fork 0
/
getServiceName
executable file
·34 lines (34 loc) · 1.03 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=~/workspace/IntelliJ/sp/mock-payment
orgName=1
serviceName=2
apiName=3
containerName=4
param=$1
if [ -z "$param" ]
then
fgrep service.name= $SRC_BASE/src/main/resources/app.props.tmpl | cut -d "=" -f 2
exit
fi
if [ $param == $orgName ]
then
fgrep service.org= $SRC_BASE/src/main/resources/app.props.tmpl | cut -d "=" -f 2
exit
elif [ $param == $serviceName ]
then
fgrep service.name= $SRC_BASE/src/main/resources/app.props.tmpl | cut -d "=" -f 2
exit
elif [ $param == $apiName ]
then
fgrep service.api.name= $SRC_BASE/src/main/resources/app.props.tmpl | cut -d "=" -f 2
exit
elif [ $param == $containerName ]
then
fgrep service.container= $SRC_BASE/src/main/resources/app.props.tmpl | cut -d "=" -f 2
exit
fi
fgrep service.api.name= $SRC_BASE/src/main/resources/app.props.tmpl | cut -d "=" -f 2
exit