mirror of
https://github.com/ACL4SSR/ACL4SSR.git
synced 2026-11-05 20:26:44 +08:00
fix a bug
This commit is contained in:
1 parent
5af7247d76
commit
86cea74b26
1 file changed
+4
-4
@@ -34,15 +34,15 @@ jobs:
|
||||
echo "Attempt $i/$MAX_RETRIES to download mihomo..."
|
||||
if TAG=$(curl -s --fail https://api.github.com/repos/MetaCubeX/mihomo/releases/latest | grep '"tag_name"' | sed -E 's/.*"([^"]+)".*/\1/'); then
|
||||
echo "Latest mihomo version: $TAG"
|
||||
if curl -L --fail -o mihomo.tar.gz "https://github.com/MetaCubeX/mihomo/releases/download/${TAG}/mihomo-linux-amd64-${TAG}.tar.gz"; then
|
||||
if curl -L --fail -o mihomo.gz "https://github.com/MetaCubeX/mihomo/releases/download/${TAG}/mihomo-linux-amd64-${TAG}.gz"; then
|
||||
echo "Download succeeded"
|
||||
if tar -xzf mihomo.tar.gz; then
|
||||
if gzip -d mihomo.gz; then
|
||||
chmod +x mihomo
|
||||
rm -f mihomo.tar.gz
|
||||
rm -f mihomo.gz
|
||||
echo "mihomo extracted and ready"
|
||||
exit 0
|
||||
else
|
||||
echo "Failed to extract mihomo.tar.gz"
|
||||
echo "Failed to extract mihomo.gz"
|
||||
fi
|
||||
else
|
||||
echo "Download failed (HTTP error)"
|
||||
|
||||
Reference in new issue
Block a user