From 11bad4f0cdc47c0a8b2ff5434b7196ec23f9c2dc Mon Sep 17 00:00:00 2001 From: Bruno21 Date: Mon, 6 Jan 2025 10:35:31 +0100 Subject: [PATCH] test --- bashbirds.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/bashbirds.sh b/bashbirds.sh index 50c51cc..346e007 100755 --- a/bashbirds.sh +++ b/bashbirds.sh @@ -30,13 +30,13 @@ RawUrl="https://x-access-token:$GITHUB_TOKEN@raw.githubusercontent.com/Bruno21/b ### Check if there's a new release of the script: LatestRelease="$(curl -s -r 0-50 $RawUrl | sed -n "/VERSION/s/VERSION=//p" | tr -d '"')" -#LatestChanges="$(curl -s -r 0-200 $RawUrl | sed -n "/ChangeNotes/s/### ChangeNotes: //p")" -LatestChanges="$(curl -s -r 0-2000 $RawUrl | sed -n "/ChangeNotes/s/# ChangeNotes: //p")" +#LatestChanges="$(curl -s -r 0-2000 $RawUrl | sed -n "/ChangeNotes/s/# ChangeNotes: //p")" +LatestChanges="$(curl -s -r 0-2000 $RawUrl | grep "^### ChangeNotes:" | sed 's/### ChangeNotes://g')" #[[ $LatestRelease != $VERSION ]] && new="($LatestRelease)" || new="" -echo "$LatestRelease" -echo "$LatestChanges" +#echo "$LatestRelease" +#echo "$LatestChanges" red="\033[1;31m" greenbold="\033[1;32m" @@ -342,7 +342,7 @@ self_update_curl() { if [[ $(builtin type -P curl) ]]; then curl -L $RawUrl > "$ScriptPath" ; chmod +x "$ScriptPath" printf "\n%s\n" "--- starting over with the updated version ---" - exec "$ScriptPath" "${ScriptArgs[@]}" # run the new script with old arguments + exec "$ScriptPath" "${ScriptArgs[@]}" >/dev/null # run the new script with old arguments exit 1 # exit the old instance elif [[ $(builtin type -P wget) ]]; then wget $RawUrl -O "$ScriptPath" ; chmod +x "$ScriptPath" @@ -371,7 +371,7 @@ self_update() { ### Version check & initiate self update if [[ "$VERSION" != "$LatestRelease" ]] ; then - printf "New version available! %b%s%b ⇒ %b%s%b \n Change Notes: %s \n" "$c_yellow" "$VERSION" "$c_reset" "$c_green" "$LatestRelease" "$c_reset" "$LatestChanges" + printf "New version available! %b%s%b ⇒ %b%s%b \nChange Notes:\n%s \n" "$c_yellow" "$VERSION" "$c_reset" "$c_green" "$LatestRelease" "$c_reset" "$LatestChanges" if [[ -z "$AutoUp" ]] ; then read -r -p "Would you like to update? y/[n]: " SelfUpdate [[ "$SelfUpdate" =~ [yY] ]] && self_update