From 65f9a805e2ef9b82fa7f8a2a43e25ed6dd4a2a01 Mon Sep 17 00:00:00 2001 From: EnderIce2 Date: Sun, 16 Mar 2025 00:25:04 +0000 Subject: [PATCH] build(userspace/coreutils): generate symlink "[" on install Signed-off-by: EnderIce2 --- Userspace/coreutils/CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Userspace/coreutils/CMakeLists.txt b/Userspace/coreutils/CMakeLists.txt index 5f5fe17c..ed170fb3 100644 --- a/Userspace/coreutils/CMakeLists.txt +++ b/Userspace/coreutils/CMakeLists.txt @@ -49,3 +49,11 @@ foreach(name IN LISTS GROUP_MAP_) ) install(TARGETS ${name} DESTINATION bin) endforeach() + +if(UNIX AND TARGET test) + install(CODE "execute_process( + COMMAND ${CMAKE_COMMAND} -E create_symlink + test + \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/bin/[\" + )") +endif()