fix sed script in configure
This commit is contained in:
@@ -1,5 +1,8 @@
|
|||||||
2015-07-31 Niibe Yutaka <gniibe@fsij.org>
|
2015-07-31 Niibe Yutaka <gniibe@fsij.org>
|
||||||
|
|
||||||
|
* src/configure (output_vendor_product_serial_strings): Fix sed
|
||||||
|
script when string is short. Remove empty line.
|
||||||
|
|
||||||
* regnual/regnual.c (usb_cb_ctrl_write_finish, usb_cb_setup)
|
* regnual/regnual.c (usb_cb_ctrl_write_finish, usb_cb_setup)
|
||||||
(usb_cb_get_descriptor, usb_cb_interface): Follow the change
|
(usb_cb_get_descriptor, usb_cb_interface): Follow the change
|
||||||
of USB API.
|
of USB API.
|
||||||
|
|||||||
10
src/configure
vendored
10
src/configure
vendored
@@ -266,14 +266,14 @@ output_vendor_product_serial_strings () {
|
|||||||
echo " ${#VENDOR}*2+2, /* bLength */"
|
echo " ${#VENDOR}*2+2, /* bLength */"
|
||||||
echo " USB_STRING_DESCRIPTOR_TYPE, /* bDescriptorType */"
|
echo " USB_STRING_DESCRIPTOR_TYPE, /* bDescriptorType */"
|
||||||
echo " /* Manufacturer: \"$VENDOR\" */"
|
echo " /* Manufacturer: \"$VENDOR\" */"
|
||||||
echo $VENDOR | sed -n -e "s/\(........\)/\1\\${nl}/gp" | sed -n -e "s/\(.\)/'\1', 0, /g" -e "s/^/ /" -e "s/ $//p"
|
echo $VENDOR | sed -e "s/\(........\)/\1\\${nl}/g" | sed -n -e "s/\(.\)/'\1', 0, /g" -e "s/^/ /" -e "/^ ./s/ $//p"
|
||||||
echo '};'
|
echo '};'
|
||||||
echo
|
echo
|
||||||
echo "static const uint8_t ${prefix}string_product[] = {"
|
echo "static const uint8_t ${prefix}string_product[] = {"
|
||||||
echo " ${#PRODUCT}*2+2, /* bLength */"
|
echo " ${#PRODUCT}*2+2, /* bLength */"
|
||||||
echo " USB_STRING_DESCRIPTOR_TYPE, /* bDescriptorType */"
|
echo " USB_STRING_DESCRIPTOR_TYPE, /* bDescriptorType */"
|
||||||
echo " /* Product name: \"$PRODUCT\" */"
|
echo " /* Product name: \"$PRODUCT\" */"
|
||||||
echo $PRODUCT | sed -n -e "s/\(........\)/\1\\${nl}/gp" | sed -n -e "s/\(.\)/'\1', 0, /g" -e "s/^/ /" -e "s/ $//p"
|
echo $PRODUCT | sed -e "s/\(........\)/\1\\${nl}/g" | sed -n -e "s/\(.\)/'\1', 0, /g" -e "s/^/ /" -e "/^ ./s/ $//p"
|
||||||
echo '};'
|
echo '};'
|
||||||
|
|
||||||
if test -n "$prefix"; then
|
if test -n "$prefix"; then
|
||||||
@@ -282,7 +282,7 @@ output_vendor_product_serial_strings () {
|
|||||||
echo " ${#SERIALNO}*2+2+16, /* bLength */"
|
echo " ${#SERIALNO}*2+2+16, /* bLength */"
|
||||||
echo " USB_STRING_DESCRIPTOR_TYPE, /* bDescriptorType */"
|
echo " USB_STRING_DESCRIPTOR_TYPE, /* bDescriptorType */"
|
||||||
echo " /* Serial number: \"$SERIALNO\" */"
|
echo " /* Serial number: \"$SERIALNO\" */"
|
||||||
echo $SERIALNO | sed -n -e "s/\(........\)/\1\\${nl}/gp" | sed -n -e "s/\(.\)/'\1', 0, /g" -e "s/^/ /" -e "s/ $//p"
|
echo $SERIALNO | sed -e "s/\(........\)/\1\\${nl}/g" | sed -n -e "s/\(.\)/'\1', 0, /g" -e "s/^/ /" -e "/^ ./s/ $//p"
|
||||||
echo " 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,"
|
echo " 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,"
|
||||||
echo " 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,"
|
echo " 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,"
|
||||||
echo '};'
|
echo '};'
|
||||||
@@ -292,14 +292,14 @@ output_vendor_product_serial_strings () {
|
|||||||
echo " ${#REVISION}*2+2, /* bLength */"
|
echo " ${#REVISION}*2+2, /* bLength */"
|
||||||
echo " USB_STRING_DESCRIPTOR_TYPE, /* bDescriptorType */"
|
echo " USB_STRING_DESCRIPTOR_TYPE, /* bDescriptorType */"
|
||||||
echo " /* revision detail: \"$REVISION\" */"
|
echo " /* revision detail: \"$REVISION\" */"
|
||||||
echo $REVISION | sed -n -e "s/\(........\)/\1\\${nl}/gp" | sed -n -e "s/\(.\)/'\1', 0, /g" -e "s/^/ /" -e "s/ $//p"
|
echo $REVISION | sed -e "s/\(........\)/\1\\${nl}/g" | sed -n -e "s/\(.\)/'\1', 0, /g" -e "s/^/ /" -e "/^ ./s/ $//p"
|
||||||
echo '};'
|
echo '};'
|
||||||
echo
|
echo
|
||||||
echo "static const uint8_t ${prefix}config_options[] = {"
|
echo "static const uint8_t ${prefix}config_options[] = {"
|
||||||
echo " ${#CONFIG}*2+2, /* bLength */"
|
echo " ${#CONFIG}*2+2, /* bLength */"
|
||||||
echo " USB_STRING_DESCRIPTOR_TYPE, /* bDescriptorType */"
|
echo " USB_STRING_DESCRIPTOR_TYPE, /* bDescriptorType */"
|
||||||
echo " /* configure options: \"$CONFIG\" */"
|
echo " /* configure options: \"$CONFIG\" */"
|
||||||
echo $CONFIG | sed -n -e "s/\(........\)/\1\\${nl}/gp" | sed -n -e "s/\(.\)/'\1', 0, /g" -e "s/^/ /" -e "s/ $//p"
|
echo $CONFIG | sed -e "s/\(........\)/\1\\${nl}/g" | sed -n -e "s/\(.\)/'\1', 0, /g" -e "s/^/ /" -e "/^ ./s/ $//p"
|
||||||
echo '};'
|
echo '};'
|
||||||
echo '#endif'
|
echo '#endif'
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user