File tree 3 files changed +12
-3
lines changed
3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -54,9 +54,9 @@ shift # past argument or value
54
54
done
55
55
56
56
script_dir=$( dirname " $( readlink -f " $0 " ) " )
57
- output_folder=" $( pwd) /output"
58
- # source utility functions
59
57
source " ${script_dir} " /utilities.sh
58
+ output_folder=" $( get_output_folder) "
59
+ # source utility functions
60
60
61
61
if [ -z " ${protobuf_version} " ]; then
62
62
protobuf_version=$( get_protobuf_version " ${gapic_generator_version} " )
Original file line number Diff line number Diff line change 45
45
script_dir=$( dirname " $( readlink -f " $0 " ) " )
46
46
source " ${script_dir} /../utilities.sh"
47
47
library_generation_dir=" ${script_dir} " /..
48
- output_folder=" $( pwd ) /output "
48
+ output_folder=" $( get_output_folder ) "
49
49
mkdir -p " ${output_folder} "
50
50
pushd " ${output_folder} "
51
51
# checkout the master branch of googleapis/google (proto files) and WORKSPACE
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
3
3
set -xeo pipefail
4
+ utilities_script_dir=$( echo " ${BASH_SOURCE} " | rev | cut -d/ -f2- | rev)
5
+
4
6
5
7
# define utility functions
6
8
@@ -275,3 +277,10 @@ get_version_from_versions_txt() {
275
277
version=$( grep " $key :" " ${versions} " | cut -d: -f3) # 3rd field is snapshot
276
278
echo " ${version} "
277
279
}
280
+
281
+ # gets the output folder where all sources and dependencies will be located. It
282
+ # relies on utilities_script_dir which points to the same location as
283
+ # `generate_library.sh`
284
+ get_output_folder () {
285
+ echo " ${utilities_script_dir} /output"
286
+ }
You can’t perform that action at this time.
0 commit comments