@@ -102,7 +102,7 @@ if [[ -z "${CC+unset}" || -z "${CC}" ]]; then
102102 export CC=" ${CC:- $(which clang)} "
103103 msg " Using default clang as CC=${CC} "
104104 else
105- msg " Using default C comiler "
105+ msg " Using default C compiler "
106106 fi
107107else
108108 msg " Using custom CC=${CC} "
@@ -179,11 +179,11 @@ if [[ ${ASAN} == "true" ]]; then
179179fi
180180
181181repo_dir=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd) "
182- vcpkg_dir=" ${repo_dir:? } /vcpkg"
182+ vcpkg_dir=${repo_dir:? } /vcpkg
183183
184184if [[ -z ${EXPORT_DIR} ]]; then
185185 # Set default export directory variable. Used for printing end message
186- EXPORT_DIR=" ${vcpkg_dir} "
186+ EXPORT_DIR=${vcpkg_dir}
187187fi
188188
189189extra_vcpkg_args+=(" --triplet=${target_triplet} " " --host-triplet=${host_triplet} " " --x-install-root=${EXPORT_DIR} /installed" )
@@ -248,6 +248,11 @@ msg "Building dependencies"
248248msg " Passing extra args to 'vcpkg install':"
249249msg " " " ${VCPKG_ARGS[@]} "
250250
251+ overlays=()
252+ if [ -f " ${repo_dir} /overlays.txt" ] ; then
253+ readarray -t overlays < <( cat " ${repo_dir} /overlays.txt" )
254+ fi
255+
251256# Check if we should upgrade ports
252257if [[ ${UPGRADE_PORTS} == " true" ]]; then
253258 echo " "
@@ -256,14 +261,15 @@ if [[ ${UPGRADE_PORTS} == "true" ]]; then
256261 cd " ${repo_dir} "
257262 (
258263 set -x
259- " ${vcpkg_dir} /vcpkg" upgrade " ${extra_vcpkg_args[@]} " ' @overlays.txt' --no-dry-run --allow-unsupported
264+ # shellcheck disable=SC2046
265+ " ${vcpkg_dir} /vcpkg" upgrade " ${extra_vcpkg_args[@]} " " ${overlays[@]} " --no-dry-run --allow-unsupported
260266 )
261267 ) || exit 1
262268fi
263269
264- dep_file= ' @dependencies.txt '
265- if [ ! -f " ${repo_dir} /dependencies.txt" ] ; then
266- dep_file= ' '
270+ deps=()
271+ if [ -f " ${repo_dir} /dependencies.txt" ] ; then
272+ readarray -t deps < <( cat " ${repo_dir} /dependencies.txt " )
267273fi
268274
269275# Run the vcpkg installation of our packages
272278 (
273279 set -x
274280
275- " ${vcpkg_dir} /vcpkg" install " ${extra_vcpkg_args[@]} " ' @ overlays.txt ' " ${dep_file } " " ${VCPKG_ARGS[@]} "
281+ " ${vcpkg_dir} /vcpkg" install " ${extra_vcpkg_args[@]} " " ${ overlays[@]} " " ${deps[@] } " " ${VCPKG_ARGS[@]} "
276282 )
277283) || exit 1
278284
0 commit comments