File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -122,18 +122,18 @@ echo -n "."
122
122
echo " Error: $sharch not found"
123
123
clean_up 1
124
124
}
125
- sha1=$( cat $sharch | sha1sum | awk ' {print $1}' )
126
125
echo -n " ."
127
126
cp $installer_dir /sharch_body.sh $output_file || {
128
127
echo " Error: Problems copying sharch_body.sh"
129
128
clean_up 1
130
129
}
131
130
132
131
# Replace variables in the sharch template
133
- sed -i -e " s/%%IMAGE_SHA1%%/$sha1 /" $output_file
134
132
echo -n " ."
135
133
tar_size=" $( wc -c < " ${sharch} " ) "
136
134
cat $sharch >> $output_file
135
+ sha1=$( sed -e ' 1,/^exit_marker$/d' " $output_file " | sha1sum | awk ' { print $1 }' )
136
+ sed -i -e " s/%%IMAGE_SHA1%%/$sha1 /" $output_file
137
137
sed -i -e " s|%%PAYLOAD_IMAGE_SIZE%%|${tar_size} |" ${output_file}
138
138
echo " secure upgrade flags: SECURE_UPGRADE_MODE = $SECURE_UPGRADE_MODE , \
139
139
SECURE_UPGRADE_DEV_SIGNING_KEY = $SECURE_UPGRADE_DEV_SIGNING_KEY , SECURE_UPGRADE_DEV_SIGNING_CERT = $SECURE_UPGRADE_DEV_SIGNING_CERT "
@@ -168,7 +168,7 @@ if [ "$SECURE_UPGRADE_MODE" = "dev" -o "$SECURE_UPGRADE_MODE" = "prod" ]; then
168
168
# append signature to binary
169
169
cat ${CMS_SIG} >> ${output_file}
170
170
sudo rm -rf ${CMS_SIG}
171
- elif [ " $SECURE_UPGRADE_MODE " -ne " no_sign" ]; then
171
+ elif [ " $SECURE_UPGRADE_MODE " != " no_sign" ]; then
172
172
echo " SECURE_UPGRADE_MODE not defined or defined as $SECURE_UPGRADE_MODE - build without signing"
173
173
fi
174
174
You can’t perform that action at this time.
0 commit comments