From 856a163be30c52154090efd656617a159c05ac88 Mon Sep 17 00:00:00 2001 From: Chris Titus Date: Thu, 29 Aug 2024 14:58:09 -0500 Subject: [PATCH] fix jq requirement and arch install error --- src/commands/system-setup/arch/server-setup.sh | 3 --- startdev.sh | 4 +++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/commands/system-setup/arch/server-setup.sh b/src/commands/system-setup/arch/server-setup.sh index cb76e054..87400b22 100755 --- a/src/commands/system-setup/arch/server-setup.sh +++ b/src/commands/system-setup/arch/server-setup.sh @@ -670,7 +670,4 @@ sed -i 's/^%wheel ALL=(ALL:ALL) NOPASSWD: ALL/# %wheel ALL=(ALL:ALL) NOPASSWD: A # Add sudo rights sed -i 's/^# %wheel ALL=(ALL) ALL/%wheel ALL=(ALL) ALL/' /etc/sudoers sed -i 's/^# %wheel ALL=(ALL:ALL) ALL/%wheel ALL=(ALL:ALL) ALL/' /etc/sudoers - -# Replace in the same state -cd "$(pwd)" || exit EOF diff --git a/startdev.sh b/startdev.sh index 2c5d5521..1070ea42 100755 --- a/startdev.sh +++ b/startdev.sh @@ -5,7 +5,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 | jq -r 'map(select(.prerelease == true)) | .[0].tag_name') + latest_release=$(curl -s https://api.github.com/repos/ChrisTitusTech/linutil/releases | + grep -oP '"tag_name": "\K[^"]*' | + head -n 1) if [ -z "$latest_release" ]; then echo "Error fetching release data" >&2 return 1