From 64033b77132e016ab184b28f345473a1cee4bc82 Mon Sep 17 00:00:00 2001 From: "Dark@Zzz" Date: Fri, 2 Jan 2026 13:18:32 +0800 Subject: [PATCH] Update fetch-better-cf-ip.yml --- .github/workflows/fetch-better-cf-ip.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/fetch-better-cf-ip.yml b/.github/workflows/fetch-better-cf-ip.yml index de54a34d..e76ff906 100644 --- a/.github/workflows/fetch-better-cf-ip.yml +++ b/.github/workflows/fetch-better-cf-ip.yml @@ -35,15 +35,14 @@ jobs: run: | match=cfst for filepath in ref1/*; do - rename=$(echo $filepath | awk -F'[./]' '{print $2}' | sed "s/cfst/cf/g") + rename=$(echo $filepath | awk -F'[./]' '{print $2}' | sed "s/$match/cf/g") - exename=$(tar -tf $filepath 2>/dev/null | grep -i $match || true) - echo $rename $exename + exename=$(tar -tf $filepath 2>/dev/null | grep -w $match || true) if [ ! -z $exename ]; then echo "Extracting $rename" tar -xf $filepath $exename -O >./target/$rename fi - exename=$(unzip -l $filepath 2>/dev/null | awk '{print $4}' | grep -i $match || true) + exename=$(unzip -l $filepath 2>/dev/null | awk '{print $4}' | grep -w $match || true) if [ ! -z $exename ]; then appendix=$(echo $exename | awk -F'.' '{print $2}') if [ ! -z $appendix ]; then