FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
grpc-java/buildscripts/run_in_docker.sh at master · Java-Edge/grpc-java · GitHub
Java-Edge
/
grpc-java
Public
forked from
grpc/grpc-java
Notifications
You must be signed in to change notification settings
Fork
0
Star
1
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
grpc-java
/
buildscripts
/
run_in_docker.sh
Copy path
More file actions
More file actions
Latest commit
History
History
History
executable file
·
27 lines (24 loc) · 790 Bytes
Breadcrumbs
grpc-java
/
buildscripts
/
run_in_docker.sh
Copy path
File metadata and controls
executable file
·
27 lines (24 loc) · 790 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
#!
/bin/bash
set
-eu -o pipefail
quote
() {
local
arg
for
arg
in
"
$@
"
;
do
printf
"
'
"
printf
"
%s
"
"
$arg
"
|
sed -e
"
s/'/'
\\\\
''/g
"
printf
"
'
"
done
}
readonly
docker_image=
$1
;
shift
readonly
grpc_java_dir=
"
$(
dirname
"
$(
readlink -f
"
$0
"
)
"
)
/..
"
if
[[
-t
0 ]]
;
then
DOCKER_ARGS=
"
-it
"
else
#
The input device on kokoro is not a TTY, so -it does not work.
DOCKER_ARGS=
fi
#
Use a trap function to fix file permissions upon exit, without affecting
#
the original exit code. $DOCKER_ARGS can not be quoted, otherwise it becomes a '' which confuses
#
docker.
exec
docker run
$DOCKER_ARGS
--rm=true -v
"
${grpc_java_dir}
"
:/grpc-java -w /grpc-java \
$docker_image
\
bash -c
"
function fixFiles() { chown -R
$(
id -u
)
:
$(
id -g
)
/grpc-java; }; trap fixFiles EXIT;
$(
quote
"
$@
"
)
"
Back
|
FazBrowse Home
|
New Git URL