mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2024-12-24 12:29:44 +00:00
Fix grep error in alpine linux
This commit is contained in:
parent
987f5da3b9
commit
a10c1edb8e
|
@ -8,8 +8,9 @@ RED='\033[0;31m'
|
|||
# Function to fetch the latest release tag from the GitHub API
|
||||
get_latest_release() {
|
||||
latest_release=$(curl -s https://api.github.com/repos/ChrisTitusTech/linutil/releases |
|
||||
grep -oP '"tag_name": "\K[^"]*' |
|
||||
head -n 1)
|
||||
grep "tag_name" |
|
||||
head -n 1 |
|
||||
sed -E 's/.*"tag_name": "([^"]+)".*/\1/')
|
||||
if [ -z "$latest_release" ]; then
|
||||
printf "%b\n" "Error fetching release data" >&2
|
||||
return 1
|
||||
|
|
Loading…
Reference in New Issue
Block a user