common/bin/compare.sh

changeset 912
a667caba1e84
parent 808
0f704e36bc5d
child 1133
50aaf272884f
child 2215
7a73b8b4ac8a
equal deleted inserted replaced
906:40e892e2a4f2 912:a667caba1e84
1111 1111
1112 # Figure out the layout of the this build. Which kinds of images have been produced 1112 # Figure out the layout of the this build. Which kinds of images have been produced
1113 if [ -d "$THIS/install/j2sdk-image" ]; then 1113 if [ -d "$THIS/install/j2sdk-image" ]; then
1114 THIS_J2SDK="$THIS/install/j2sdk-image" 1114 THIS_J2SDK="$THIS/install/j2sdk-image"
1115 THIS_J2RE="$THIS/install/j2re-image" 1115 THIS_J2RE="$THIS/install/j2re-image"
1116 echo "Comparing install images" 1116 echo "Selecting install images in this build"
1117 elif [ -d "$THIS/deploy/j2sdk-image" ]; then 1117 elif [ -d "$THIS/deploy/j2sdk-image" ]; then
1118 THIS_J2SDK="$THIS/deploy/j2sdk-image" 1118 THIS_J2SDK="$THIS/deploy/j2sdk-image"
1119 THIS_J2RE="$THIS/deploy/j2re-image" 1119 THIS_J2RE="$THIS/deploy/j2re-image"
1120 echo "Comparing deploy images" 1120 echo "Selecting deploy images in this build"
1121 elif [ -d "$THIS/images/j2sdk-image" ]; then 1121 elif [ -d "$THIS/images/j2sdk-image" ]; then
1122 THIS_J2SDK="$THIS/images/j2sdk-image" 1122 THIS_J2SDK="$THIS/images/j2sdk-image"
1123 THIS_J2RE="$THIS/images/j2re-image" 1123 THIS_J2RE="$THIS/images/j2re-image"
1124 echo "Selecting jdk images in this build"
1124 fi 1125 fi
1125 1126
1126 if [ -d "$THIS/images/j2sdk-overlay-image" ]; then 1127 if [ -d "$THIS/images/j2sdk-overlay-image" ]; then
1127 if [ -d "$THIS/install/j2sdk-image" ]; then 1128 if [ -d "$THIS/install/j2sdk-image" ]; then
1128 # If there is an install image, prefer that, it's also overlay 1129 # If there is an install image, prefer that, it's also overlay
1129 THIS_J2SDK_OVERLAY="$THIS/install/j2sdk-image" 1130 THIS_J2SDK_OVERLAY="$THIS/install/j2sdk-image"
1130 THIS_J2RE_OVERLAY="$THIS/install/j2re-image" 1131 THIS_J2RE_OVERLAY="$THIS/install/j2re-image"
1132 echo "Selecting install overlay images in this build"
1131 else 1133 else
1132 THIS_J2SDK_OVERLAY="$THIS/images/j2sdk-overlay-image" 1134 THIS_J2SDK_OVERLAY="$THIS/images/j2sdk-overlay-image"
1133 THIS_J2RE_OVERLAY="$THIS/images/j2re-overlay-image" 1135 THIS_J2RE_OVERLAY="$THIS/images/j2re-overlay-image"
1136 echo "Selecting jdk overlay images in this build"
1134 fi 1137 fi
1135 fi 1138 fi
1136 1139
1137 if [ -d "$THIS/images/j2sdk-bundle" ]; then 1140 if [ -d "$THIS/images/j2sdk-bundle" ]; then
1138 THIS_J2SDK_BUNDLE="$THIS/images/j2sdk-bundle" 1141 THIS_J2SDK_BUNDLE="$THIS/images/j2sdk-bundle"
1139 THIS_J2RE_BUNDLE="$THIS/images/j2re-bundle" 1142 THIS_J2RE_BUNDLE="$THIS/images/j2re-bundle"
1143 echo "Selecting bundles in this build"
1140 fi 1144 fi
1141 1145
1142 # Figure out the layout of the other build (old or new, normal or overlay image) 1146 # Figure out the layout of the other build (old or new, normal or overlay image)
1143 if [ -d "$OTHER/j2sdk-image" ]; then 1147 if [ -d "$OTHER/j2sdk-image" ]; then
1144 if [ -f "$OTHER/j2sdk-image/LICENSE" ]; then 1148 if [ -f "$OTHER/j2sdk-image/LICENSE" ]; then
1145 OTHER_J2SDK="$OTHER/j2sdk-image" 1149 OTHER_J2SDK="$OTHER/j2sdk-image"
1146 OTHER_J2RE="$OTHER/j2re-image" 1150 OTHER_J2RE="$OTHER/j2re-image"
1151 echo "Selecting old-style images in other build"
1147 else 1152 else
1148 OTHER_J2SDK_OVERLAY="$OTHER/j2sdk-image" 1153 OTHER_J2SDK_OVERLAY="$OTHER/j2sdk-image"
1149 OTHER_J2RE_OVERLAY="$OTHER/j2re-image" 1154 OTHER_J2RE_OVERLAY="$OTHER/j2re-image"
1150 fi 1155 echo "Selecting overlay images in other build"
1156 fi
1157 elif [ -d "$OTHER/install/j2sdk-image" ]; then
1158 OTHER_J2SDK="$OTHER/install/j2sdk-image"
1159 OTHER_J2RE="$OTHER/install/j2re-image"
1160 echo "Selecting install images in other build"
1161 elif [ -d "$OTHER/deploy/j2sdk-image" ]; then
1162 OTHER_J2SDK="$OTHER/deploy/j2sdk-image"
1163 OTHER_J2RE="$OTHER/deploy/j2re-image"
1164 echo "Selecting deploy images in other build"
1151 elif [ -d "$OTHER/images/j2sdk-image" ]; then 1165 elif [ -d "$OTHER/images/j2sdk-image" ]; then
1152 OTHER_J2SDK="$OTHER/images/j2sdk-image" 1166 OTHER_J2SDK="$OTHER/images/j2sdk-image"
1153 OTHER_J2RE="$OTHER/images/j2re-image" 1167 OTHER_J2RE="$OTHER/images/j2re-image"
1168 echo "Selecting jdk images in other build"
1154 fi 1169 fi
1155 1170
1156 if [ -d "$OTHER/j2sdk-bundle" ]; then 1171 if [ -d "$OTHER/j2sdk-bundle" ]; then
1157 OTHER_J2SDK_BUNDLE="$OTHER/j2sdk-bundle" 1172 OTHER_J2SDK_BUNDLE="$OTHER/j2sdk-bundle"
1158 OTHER_J2RE_BUNDLE="$OTHER/j2re-bundle" 1173 OTHER_J2RE_BUNDLE="$OTHER/j2re-bundle"
1174 echo "Selecting bundles in other build"
1159 elif [ -d "$OTHER/images/j2sdk-bundle" ]; then 1175 elif [ -d "$OTHER/images/j2sdk-bundle" ]; then
1160 OTHER_J2SDK_BUNDLE="$OTHER/images/j2sdk-bundle" 1176 OTHER_J2SDK_BUNDLE="$OTHER/images/j2sdk-bundle"
1161 OTHER_J2RE_BUNDLE="$OTHER/images/j2re-bundle" 1177 OTHER_J2RE_BUNDLE="$OTHER/images/j2re-bundle"
1178 echo "Selecting jdk bundles in other build"
1162 fi 1179 fi
1163 1180
1164 if [ -z "$THIS_J2SDK" ] || [ -z "$THIS_J2RE" ]; then 1181 if [ -z "$THIS_J2SDK" ] || [ -z "$THIS_J2RE" ]; then
1165 if [ -z "$THIS_J2SDK_OVERLAY" ]; then 1182 if [ -z "$THIS_J2SDK_OVERLAY" ]; then
1166 echo "Cannot locate images for this build. Are you sure you have run 'make images'?" 1183 echo "Cannot locate images for this build. Are you sure you have run 'make images'?"

mercurial