From cd836ba537a77d81f9a7813112c72b476f40acff Mon Sep 17 00:00:00 2001 From: Heavybullets8 Date: Tue, 23 Aug 2022 13:02:09 -0600 Subject: [PATCH] Formatting, only pull CL in curl --- functions/self_update.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/functions/self_update.sh b/functions/self_update.sh index 5f47e090..a6ff8064 100644 --- a/functions/self_update.sh +++ b/functions/self_update.sh @@ -4,22 +4,22 @@ args=("$@") self_update() { latest_ver=$(git describe --tags "$(git rev-list --tags --max-count=1)") -git fetch --tags &> /dev/null +git fetch --tags &>/dev/null echo "🅂 🄴 🄻 🄵" echo "🅄 🄿 🄳 🄰 🅃 🄴" if [[ "$hs_version" != "$latest_ver" ]] ; then echo "Found a new version of HeavyScript, updating myself..." - git checkout "$latest_ver" + git checkout "$latest_ver" &>/dev/null count=0 for i in "${args[@]}" do [[ "$i" == "--self-update" ]] && unset "args[$count]" && break ((count++)) done - echo "Updating from:" - echo "$hs_version" - echo "Updating To:" - curl --silent "https://api.github.com/repos/HeavyBullets8/heavy_script/releases/latest" | jq -r .tag_name,.body + echo "Updating from: $hs_version" + echo "Updating To: $latest_ver" + echo "Changelog:" + curl --silent "https://api.github.com/repos/HeavyBullets8/heavy_script/releases/latest" | jq -r .body [[ -z ${args[*]} ]] && echo -e "No more arguments, exiting..\n\n" && exit echo -e "Running the new version...\n\n" sleep 5