mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-21 23:20:20 +00:00
Meta: Use portable gzip option for extracting PCI and USB ID files
gzip -c is supported in both Linux and BSD flavors of gzip. The -o flag was introduced in a previous commit which is present in OpenBSD, but not other flavors of Linux. -c will write to stdout which is redirected to the target files. As a side benefit, we no longer need to copy files anywhere
This commit is contained in:
parent
018dc4bb5c
commit
4633f89217
Notes:
sideshowbarker
2024-07-17 21:58:17 +09:00
Author: https://github.com/tuftedocelot Commit: https://github.com/SerenityOS/serenity/commit/4633f89217f Pull-request: https://github.com/SerenityOS/serenity/pull/11490 Reviewed-by: https://github.com/BertalanD Reviewed-by: https://github.com/trflynn89
1 changed files with 2 additions and 4 deletions
|
@ -270,8 +270,7 @@ endif()
|
|||
if(EXISTS ${PCI_IDS_GZ_PATH} AND NOT EXISTS ${PCI_IDS_INSTALL_PATH})
|
||||
message(STATUS "Extracting PCI ID database from ${PCI_IDS_GZ_PATH}...")
|
||||
file(MAKE_DIRECTORY ${CMAKE_INSTALL_DATAROOTDIR})
|
||||
file(COPY ${PCI_IDS_GZ_PATH} DESTINATION ${CMAKE_INSTALL_DATAROOTDIR})
|
||||
execute_process(COMMAND gzip -d -o ${PCI_IDS_INSTALL_PATH} ${CMAKE_INSTALL_DATAROOTDIR}/${PCI_IDS_FILE}.gz)
|
||||
execute_process(COMMAND gzip -d -c "${PCI_IDS_GZ_PATH}" OUTPUT_FILE "${PCI_IDS_INSTALL_PATH}")
|
||||
endif()
|
||||
|
||||
set(USB_IDS_FILE usb.ids)
|
||||
|
@ -288,6 +287,5 @@ endif()
|
|||
if(EXISTS ${USB_IDS_GZ_PATH} AND NOT EXISTS ${USB_IDS_INSTALL_PATH})
|
||||
message(STATUS "Extracting USB ID database from ${USB_IDS_GZ_PATH}...")
|
||||
file(MAKE_DIRECTORY ${CMAKE_INSTALL_DATAROOTDIR})
|
||||
file(COPY ${USB_IDS_GZ_PATH} DESTINATION ${CMAKE_INSTALL_DATAROOTDIR})
|
||||
execute_process(COMMAND gzip -d -o ${USB_IDS_INSTALL_PATH} ${CMAKE_INSTALL_DATAROOTDIR}/${USB_IDS_FILE}.gz)
|
||||
execute_process(COMMAND gzip -d -c "${USB_IDS_GZ_PATH}" OUTPUT_FILE "${USB_IDS_INSTALL_PATH}")
|
||||
endif()
|
||||
|
|
Loading…
Reference in a new issue