File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
xcodeproj/internal/templates Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -85,8 +85,17 @@ if [[ $for_fixture -eq 1 ]]; then
85
85
readonly generator_package_name=" ${generator_package_name_prefix#*/*/*/ } "
86
86
readonly generator_name=" ${generator_package_name##*/ } "
87
87
88
+ if command -v /sbin/md5 > /dev/null 2>&1 ; then
89
+ readonly md5_command=" /sbin/md5"
90
+ elif command -v md5sum > /dev/null 2>&1 ; then
91
+ readonly md5_command=" md5sum"
92
+ else
93
+ fail " ERROR: Unable to find a command to calculate MD5 hash; please install" \
94
+ " md5 or md5sum"
95
+ fi
96
+
88
97
# Copy over generated generator
89
- output_base_hash=$( /sbin/md5 -q -s " ${execution_root%/*/* } " )
98
+ output_base_hash=$( echo " ${execution_root%/*/* } " | " $md5_command " | awk ' {print $1} ' )
90
99
readonly src_generator_package_directory=" /var/tmp/rules_xcodeproj/generated_v2/$output_base_hash /generator/$generator_package_name "
91
100
readonly dest_generator_package_directory=" $project_dir /generated"
92
101
readonly dest_generator_package=" ${dest_generator_package_directory:? } /$generator_name "
You can’t perform that action at this time.
0 commit comments