Commit d3635361 authored by fuyanbin's avatar fuyanbin
Browse files

fix: packtype and channelid

parent a029686f
...@@ -8,6 +8,7 @@ usage() { ...@@ -8,6 +8,7 @@ usage() {
--chroot-type <pack type> --chroot-type <pack type>
--orgcode <organization code> --orgcode <organization code>
--channelid <channel id> --channelid <channel id>
--packtype <pack type>
--help" --help"
exit 1 exit 1
} }
...@@ -19,6 +20,7 @@ DEPLOY="elf" ...@@ -19,6 +20,7 @@ DEPLOY="elf"
ORGCODE="" ORGCODE=""
CHANNELID="" CHANNELID=""
IMAGE_FILE="" IMAGE_FILE=""
PACK_TYPE="other"
# new append # new append
NOUPLOAD="false" NOUPLOAD="false"
...@@ -36,6 +38,7 @@ do ...@@ -36,6 +38,7 @@ do
--chroot-type) CHROOT_TYPE="$2"; shift 2 ;; --chroot-type) CHROOT_TYPE="$2"; shift 2 ;;
--orgcode) ORGCODE="$2"; shift 2;; --orgcode) ORGCODE="$2"; shift 2;;
--channelid) CHANNELID="$2"; shift 2;; --channelid) CHANNELID="$2"; shift 2;;
--packtype) PACK_TYPE="$2"; shift 2;;
--help) usage ;; --help) usage ;;
--) shift; break;; --) shift; break;;
*) usage ;; *) usage ;;
...@@ -87,7 +90,7 @@ build_image() { ...@@ -87,7 +90,7 @@ build_image() {
rm -f "$systemfile_ext4" rm -f "$systemfile_ext4"
fi fi
aml_image_v2_packer -r "/$build_dir/image.cfg" "$build_dir" "${packge_dir}/$(basename "$img")" aml_image_v2_packer -r "/$build_dir/image.cfg" "$build_dir" "${packge_dir}/$(basename "$img")"
rm -rf "$build_dir/" rm -rf "$build_dir"
} }
generate_vendor_confg() { generate_vendor_confg() {
...@@ -101,6 +104,8 @@ generate_vendor_confg() { ...@@ -101,6 +104,8 @@ generate_vendor_confg() {
sed -i'' "s#__ORGCODE__#$ORGCODE#g" "$yaml_file_src" sed -i'' "s#__ORGCODE__#$ORGCODE#g" "$yaml_file_src"
sed -i'' "s#__CHROOT_TYPE__#$CHROOT_TYPE#g" "$yaml_file_src" sed -i'' "s#__CHROOT_TYPE__#$CHROOT_TYPE#g" "$yaml_file_src"
sed -i'' "s#__DEPLOY__#$DEPLOY#g" "$yaml_file_src" sed -i'' "s#__DEPLOY__#$DEPLOY#g" "$yaml_file_src"
sed -i'' "s#__CHANNEL_ID__#$CHANNELID#g" "$yaml_file_src"
sed -i'' "s#__PACK_TYPE__#$PACK_TYPE#g" "$yaml_file_src"
aio -m enc -i "$yaml_file_src" -o "$yaml_file" aio -m enc -i "$yaml_file_src" -o "$yaml_file"
} }
...@@ -137,7 +142,7 @@ upload() { ...@@ -137,7 +142,7 @@ upload() {
echo "RESULT: ${VENDOR} ${IMG_URL} ${MD5SUM} ${TITLE}" echo "RESULT: ${VENDOR} ${IMG_URL} ${MD5SUM} ${TITLE}"
rm -f "$outfile" "$outfile_7z" rm -f "$outfile" "$outfile_7z"
rm -rf "$packge_dir/" rm -rf "$packge_dir"
fi fi
} }
......
...@@ -5,3 +5,5 @@ info: ...@@ -5,3 +5,5 @@ info:
mode: arm32 mode: arm32
chroottype: __CHROOT_TYPE__ chroottype: __CHROOT_TYPE__
deploy: __DEPLOY__ deploy: __DEPLOY__
packtype: __PACK_TYPE__
channelid: __CHANNEL_ID__
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment