From f3bb1e9b74b6ef6f864d2113284597b87946f252 Mon Sep 17 00:00:00 2001 From: darkclip Date: Sat, 27 Jan 2024 02:59:52 +0800 Subject: [PATCH] update --- .github/workflows/fetch-better-cf-ip.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/fetch-better-cf-ip.yml b/.github/workflows/fetch-better-cf-ip.yml index 03988cb2..42e1429e 100644 --- a/.github/workflows/fetch-better-cf-ip.yml +++ b/.github/workflows/fetch-better-cf-ip.yml @@ -47,14 +47,16 @@ jobs: run: rm target/* - name: Rebuild target branch run: | + match=CloudflareST for filepath in ref1/*; do - rename=$(echo $filepath | awk -F'[./]' '{print $2}') - exename=$(tar -tf $filepath 2>/dev/null | grep -i CloudflareST || true) + rename=$(echo $filepath | awk -F'[./]' '{print $2}' | sed "s/$match/cf/g") + + exename=$(tar -tf $filepath 2>/dev/null | grep -i $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 CloudflareST || true) + exename=$(unzip -l $filepath 2>/dev/null | awk '{print $4}' | grep -i $match || true) if [ ! -z $exename ]; then appendix=$(echo $exename | awk -F'.' '{print $2}') if [ ! -z $appendix ]; then