Skip to content

Commit

Permalink
Fix grep error in alpine linux
Browse files Browse the repository at this point in the history
  • Loading branch information
jeevithakannan2 authored Dec 10, 2024
1 parent 987f5da commit a10c1ed
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions startdev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a10c1ed

Please sign in to comment.