File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed
Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -64,8 +64,8 @@ if [ -z "$IMAGE" ] || [ -z "$IN" ] || [ -z "$OUT" ]; then
6464fi
6565
6666# Ensure that the input directory exists (and is a directory).
67- if ! [ -d $IN ]; then
68- >&2 echo " Directory does not exist: $IN "
67+ if ! [ -d " ${PROTO_PATH} / $IN " ]; then
68+ >&2 echo " Directory does not exist: ${PROTO_PATH} / $ IN"
6969 exit 2
7070fi
7171
@@ -85,10 +85,19 @@ if [ "$(ls -A $OUT )"]; then
8585 >&2 echo " Warning: Output directory is not empty."
8686fi
8787
88+ # Convert IN and OUT to absolute paths for Docker
89+ CWD=` pwd`
90+ cd ${PROTO_PATH} /$IN
91+ ABS_IN=` pwd`
92+ cd $CWD
93+ cd $OUT
94+ ABS_OUT=` pwd`
95+ cd $CWD
96+
8897# Generate the client library.
8998docker run \
90- --mount type=bind,source=${PROTO_PATH} / ${IN } ,destination=/in/${IN} ,readonly \
91- --mount type=bind,source=$OUT ,destination=/out \
99+ --mount type=bind,source=${ABS_IN } ,destination=/in/${IN} ,readonly \
100+ --mount type=bind,source=${ABS_OUT} ,destination=/out \
92101 --rm \
93102 --user $UID \
94103 $IMAGE \
You can’t perform that action at this time.
0 commit comments