From 5f8177d35a0782276973ea1b9c7393da09590dc4 Mon Sep 17 00:00:00 2001 From: hanguanqiang Date: Fri, 20 Jun 2025 07:56:44 +0800 Subject: [PATCH] Enhance the script's compatibility to ensure it runs on Linux, macOS, and other systems. --- src/test/resources/symlinks/regen.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/test/resources/symlinks/regen.sh b/src/test/resources/symlinks/regen.sh index e6a532e9..a1c7fbb9 100755 --- a/src/test/resources/symlinks/regen.sh +++ b/src/test/resources/symlinks/regen.sh @@ -13,4 +13,8 @@ echo -ne 'content' > entry2 zip --symlinks ../non_existing_symlink.zip entry1 entry2 cd .. rm -rf non_existing_symlink -LC_ALL=C sed -i '' 's/entry2/entry1/' non_existing_symlink.zip \ No newline at end of file +if [ "x$(uname)" = "xLinux" ];then + LC_ALL=C sed -i 's/entry2/entry1/' non_existing_symlink.zip +else + LC_ALL=C sed -i '' 's/entry2/entry1/' non_existing_symlink.zip +fi