From a9bce2179bfb6a7b7f5eb6dce0f5ed9f9f26afe5 Mon Sep 17 00:00:00 2001 From: nivesh <73319848+nv6@users.noreply.github.com> Date: Wed, 21 Jan 2026 05:00:05 -0500 Subject: [PATCH] enhance portability (detect user-preferred bash, replace all greps with awk) --- install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 4d974b7..1862f6b 100755 --- a/install.sh +++ b/install.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Check Root User @@ -66,7 +66,7 @@ install_gost() { ;; esac get_download_url="$base_url/tags/$version" - download_url=$(curl -s "$get_download_url" | grep -Eo "\"browser_download_url\": \".*${os}.*${cpu_arch}.*\"" | awk -F'["]' '{print $4}') + download_url=$(curl -s "$get_download_url" | awk -F'"' -v re=".*${os}.*${cpu_arch}.*" '/"browser_download_url":/ && $4 ~ re { print $4 }') # Download the binary echo "Downloading gost version $version..."